Quantcast
Channel: Forums - Python
Browsing all 2485 articles
Browse latest View live

Controling Merge Rule for Spatial Join

I need to perform a few dozen spatial joins (Version 10, SP3), with the join features having about 1,400 attribute columns. I need the merge rule for the integer fields to be sum, rather than first,...

View Article


Image may be NSFW.
Clik here to view.

Arcpy.mapping change text elemnts doesn't word with unicode

Hello, I am having a problem for days and I just can't figure it out. I have this code: Code: cenario = "1" num = MP.ListLayoutElements(mxd, "TEXT_ELEMENT")[6] num.text = "CENÁRIO " + cenario cond =...

View Article


Invalid Exception on SelectLayerByAttribute command line????

It's running through my code now but when it gets to the SelectLayerByAttribute line it says Invalid Expression. This is what I'm trying to get it to do. Once it finds the missing values I need the...

View Article

Need Help with Math Operand Error

Okay I have the following code Code: with arcpy.da.UpdateCursor(fc, fields) as rows:                     for row in rows:                         row[2] = row[0] * (32.82010551 * 32.82010551) *...

View Article

python script in modelbuilder get field value return boolean expressions

I have problems integrating a python script in a modelbuilder tool. I'm a absolute beginner with python, any help is much appreciated. Maybe there's also an easier way to solve this problem in...

View Article


Problem with reading NetCDF file

I am working with the Make NetCDF Feature Layer (Multidimension) tool with Python. I can get it to work properly outside of Python (but have a lot of data to process, so doing it manually is not really...

View Article

adding hours in date filed to get the final date python scripts

hello everyone. i am using arcgis 10 and now a days working on network analyst. i got struck in a problem. network analyst is good to calculate the final date for a route on the basis of timewindow...

View Article

Add Layer Assertion Error

I have a script that: 1. Reads the layers in my Table of Contents 2. exports them to a feature dataset 3. re-adds the exported features 4. applies a pre-determined symbology to them based on layer...

View Article


Create Point FC from Mouse Click Event

I'm starting to learn the Python Add-in starting with some simple code. This bit attempts to capture XY of mouse click event and write it to a point feature. The message box displays the XY but nothing...

View Article


Issue with script tool

Background: I have forest data stored as points and polygons. The points are the location of sample plots, and the polygons are management stands. There is a field, "SID", in the attribute table of the...

View Article

Python script that will create a list of a shapefiles values in a field.

Hello everyone, I have been searching around these forums for awhile now trying to track something down that could help me solve the problem that I am having. Basically I have 800~ rasters that I can...

View Article

Input field names with dynamic text box and delete unwanted fields

Hi all I'm trying to find a way to add field names to each feature class in a geodatabase with Python. My pseudo-code so far is: 1) Buffer points 2) Add field to each featureclass with name that...

View Article

How to measure the shortest route to the shopping center entrance?

Hi, everybody! I have some feature classes in my geodatabase, including: 1 neighbourhood point \ each shopping center entrance points \ road network. I am confused how to measure the shortest road...

View Article


Coordinate conversion

I manually import a CSV to create a table which I use to make an XY event layer during the creat process I can select the coordinate system of my CSV (NAD 27 LL) and the transformation to use for the...

View Article

AddRuleToTopology_management error

AddRuleToTopology_management do not recognize a feature class, previously recognized and listed through arcpy.ListFeatureClasses() and checked by arcpy.CheckGeometry_manegement. It is possible to add a...

View Article


How to Properly Use env.scratchGDB to Gaurantee Write Access

In scripting business processes it is coming up again and again where I need an intermediate workspace to write data. I am trying to copy a table to the scratch workspace but it is placing the table...

View Article

making fishnet

Hello Every body ! I want to make a fishnet for around 80 images (.tif), I want to call data from a path and make a fishnet for raws and columns 2*2. who has idea? Regards Nedaaaa

View Article


Opening Python Code/Script in any mxd????

What would I change my top mxd line to have it open in any mxd. I don't need parameters I just need it to run in any mxd I open. Code: import arcpy, traceback mxd =...

View Article

UpdateCursor with nested loops and SelectLayerByAttributes

Hi, I need to update fields in a feature class based on values from another feature class (with different geometry). Some of the features have multiple values and are handled in a separate loop to the...

View Article

arcpy method to create a relationship between features

Dear List I am using a relationship class (1 : n) between two feature classes (a : B). To relate newly imported features of the feature class B with the individual feature of a I would like to use...

View Article
Browsing all 2485 articles
Browse latest View live