A site-package created by Esri to expose ArcObjects to Python.

learn more… | top users | synonyms (1)

1
vote
0answers
37 views

Debugging ArcPy script to search, get value, compare to field names and sum field values?

`I am looking to do the following task: Look at the values in RegID_6k99 field (numerical field). Select all records where "RegID_6k99 == 0". In this case 6 records should be selected. For each of ...
2
votes
1answer
199 views

Arcpy Network Analyst solver error

Hello GIS Stack Exchange, I am finding it difficult to load locations to sublayers using python in ArcGIS 10.0 network analyst Vehicle routing problem. I'm also having some trouble debugging my ...
0
votes
1answer
26 views

Converting Raster datasets into layers using ArcPy/ModelBuilder?

I am new to ArcGIS and ArcPy (just started using them on Wednesday). I am using a model to create a Point Density plot from a Shape File, with the output being a Raster dataset. I want to ...
2
votes
3answers
96 views

raster area calculation using python script

Hi I am a beginner to python programming in GIS and am trying to calculate the area of a raster. When I ran the program, I got error message below. I am also providing my code. Any help would be ...
0
votes
1answer
31 views

Executing tool comes back with an error arcpy.JoinField_management

I have this script snippet, written by Aaron. import arcpy, os #set workspace arcpy.env.workspace = "C:\\Users\\Documents\\Wetland" ws = arcpy.env.workspace #create a list of features fcl = ...
0
votes
2answers
16 views

Making fields added to attribute table appear without closing/re-opening? [duplicate]

I'm using ArcPy and am experiencing some troubles. I added some fields to an existing arc (coverage) but then do not appearing in attribute table. Only when i close arcgis and reopen the fields appear ...
0
votes
1answer
28 views

Creating new layers using ArcPy to define Definition Query for each field value?

I am trying to set multiple definition queries for one layer based on one field using python. ie. I have a City layer with a field that holds the city name. I want a copy of the layer in an MXD ...
1
vote
1answer
43 views

Writing multiple file geodatabase tables into csv file with arcpy

I was asking a question about Merging geodatabase previously, (link: Merge from arcpy.ListTables() producing duplicate rows?) and although the script worked, it took more than 9 hours to run when ...
3
votes
0answers
41 views

How to cancel tool execution in python

I've written a python function that calls a tool (Import CAD to GDB) in a loop. When I run it I have seen that it hangs sometimes, and I have to force the script to quit. I am wondering if there is a ...
3
votes
1answer
813 views

Multiline VBScript Label Expressions in Arcpy

I am able to set simple label expressions, but when I try to set multiline expressions (which all VBScript expressions are) it does not get copied into the expression box properly. I have tried using ...
1
vote
2answers
32 views

Filter by quantity / query in ArcGIS

I have some data stored in a CSV file containing name and date ranges. For example: ID | Name | Start | End | X | Y ------------------------------- 1 | Test | 2014 | 2015` | ... | ... | 2 | ...
4
votes
6answers
1k views

How to move / offset point locations using ModelBuilder or ArcPy

I have a number non-georeferenced CAD layers (see this question) that have text annotation features. I have created a model to convert the text to points, but after converting the annotation to a ...
2
votes
1answer
20 views

ArcPy Empty Buffers

I have written an ArcPy script to process a DTM into a point feature class to be used in Landform classification and ranking. It successfully produces what I need most of the time. Randomly the ...
0
votes
3answers
31 views

FeatureClassToFeatureClass_conversion in ArcGis 10.1

I have many > 60 .dwg files I want to convert just the polyline parts of these and have put together a list of python commands using excel to get something like this: However when I try running ...
0
votes
2answers
49 views

How to copy attribute table values from one feature class to another

I am looking for a way to copy attribute values from one attribute table to another. I am mainly looking to do this using python, so would prefer a way to do this with a tool or a a stand-alone python ...
1
vote
4answers
57 views

How to set a minimum point snap distance?

There are two points: A and B. I need to snap any points within a 65 m search radius (blue buffer) of point A. However, the snap distance of B needs to be exactly 5m apart from A (i.e. located ...
1
vote
2answers
24 views

What's the best way to get the OBJECTID name?

What's the best way to get the OBJECTID name of a feature class? I know you can use "OID@" in a cursor to get the field, but can you get the name from that as well? I'm writing a script, and need to ...
1
vote
2answers
281 views

How to write raster field values into attribute table using ArcPy?

Is it possible to use ArcPy (10 or 10.1 )to write raster field types into a featureclass? either SDE or filegeodatabase?. I'm hoping to use arcpy as means of automating the process of adding rasters ...
0
votes
1answer
30 views

Arcpy Subtracting rasters error - TypeError: 'unicode' object is not callable

I have a script which subtracts 2 versions of the same raster from each other (one newer than the other) and then extracts the additions & deletions that have happened. I created a simple test ...
-1
votes
3answers
35 views

ArcGIS arcpy code fails in Toolbox mode

This code executes correctly in Python window but fails with ERROR 000732: Input Table: Dataset JHJ does not exist or is not supported # Import ArcPy and other required modules import arcpy ...
1
vote
1answer
245 views

mosaic raster to file geodatabase yields missing raster sections

Since upgrading to ArcGIS 10.1 (SP 1) from 10.0, I've been encountering an issue when running the arcpy.MosaicToNewRaster_management() tool with output to a file geodatabase. I'm principally working ...
4
votes
1answer
5k views

Thiessen Polygon delineation within a Feature

I am trying to create Thiessen (Voronoi) polygons, based on points within a defined shapefile extent. The output should be inclusive to the feature. The output I receive now is the rectangular area ...
2
votes
1answer
212 views

How to change value of an individual pixel using arcpy?

I want to change the value of an individual pixel in a raster using arcpy. The code I wrote for changing the value is below, but it changes all of pixels in my raster. How can I set an individual ...
1
vote
1answer
48 views

ArcGIS 10.1 arcpy Update Cursor is returning a list instead of a row

I keep getting the following error: Traceback (most recent call last): File "R:\GIS_ScriptsandTools\PullHotParametersLabel.py", line 16, in TitleLine = ""+row.getValue(IDfield)+" ("+ ...
1
vote
1answer
52 views

How to get the name of a subtype field in a feature class in Python?

I have a geodatabase with many feature classes. Some of the feature classes have subtype fields. Their names vary feature class by feature class. I now want to find the names of those subtype fields. ...
2
votes
1answer
58 views

forLoop & joinField & different names

I have a folder with an output (shapefiles) from an iteration. On this output, I want to perform a join between two attributetables. So far so good. Here comes the tricky part. There are different ...
0
votes
1answer
34 views

Script never finishes and throws no errors. Creates lock on file until restart?

I have a simple script that gets all layers in a gdb and uses them to clip a DEM. What's happening though is it starts the clipping but never finishes and after killing the process I am unable to ...
2
votes
2answers
53 views

Check if a single feature is completely within another (arcpy)

I have a feature class that contains one polygon feature, and I need to check if said feature lies completely within another polygon feature. Used selectLayerByLocation and then retrieved the count ...
0
votes
0answers
17 views

Inline variable substitution in ModelBuilder iteration - Make NetCDF Raster Layers

I'm trying to convert lots of annual NetCDF files into rasters using Model builder. I'm iterating over several years so the filename changes every year which works fine (using the inline substitution ...
4
votes
2answers
237 views

Checking current user privileges for an SDE dataset with Python/arcpy

I am managing data distribution via an ArcSDE Oracle gdb to a number of users (schemas?), each of which can only have read only access to datasets they have requested access to, and have then been ...
2
votes
2answers
1k views

Using newline/page break tag in ArcGIS Desktop Text_Element in arcpy.mapping? [duplicate]

I want to update a Text_Element with a newline or page break using ArcGIS Desktop 10.0. Does anyone know the tag or syntax?
12
votes
3answers
8k views

Will ArcGIS 10 support Python 2.7 or Python 3.1?

I'm curious to know whether ArcGIS 10 will support newer versions of Python than 2.6. And for that matter newer versions of NumPy (ie, 1.4, 1.5 etc). I'm sure that this documentation is on the ESRI ...
1
vote
1answer
57 views

Iterating over all features in featureclass to intersect them individually with polygon using ArcPy?

I've got a point featureclass, and I'm trying to individually intersect each feature with a polygon featureclass to get some information about which polygon each feature is in. I did one intersect ...
1
vote
1answer
22 views

Intersection of two polyline geometries not returning expected coordinates?

T2B = arcpy.Array([arcpy.Point(1,2),arcpy.Point(-1, -2)]) L2R = arcpy.Array([arcpy.Point(0, 2), arcpy.Point(1, -2)]) L2R_line = arcpy.Polyline(L2R) T2B_line = arcpy.Polyline(T2B) cent = ...
1
vote
1answer
29 views

Python Toolbox (.pyt) Tool Output Layer Name

How can I manipulate the TOC display name of my output parameters when using a Python toolbox (.pyt) Tool class. I tried adding a symbology layer, however this has no affect on the TOC name. Is it ...
3
votes
1answer
103 views

How do I change to a Historical version using Python and arcpy

I am having an issue trying to change to a historical version on an SDE feature class using Python and arcpy.ChangeVersion_management. I am able to manually change the version to a specific date and ...
0
votes
1answer
105 views

Automating calculation of Population Density in Census Tracts?

I am quite new to Python and I am attempting to practice by making a simple program with ArcGIS. I wanted to make a script that automated the calculation of population density of selected census ...
1
vote
2answers
57 views

Error in Select Layer by Location python script?

I keep on getting an error on Select by location that the file cannot be found and the inputs are invalid, but I can't figure out what I'm doing incorrectly. I realize some of my variables ...
2
votes
2answers
181 views

Dissolving polygons fails on computers with small amount of RAM

When I'm trying to dissolve a polygon through an arcpy script the operation fails with the 999999 error on computers with small amount of RAM [~3 GB] (known issue). Unfortunately neither this, that ...
3
votes
2answers
147 views

How to publish GP Service with importing of numpy in ArcGIS for Server 10.1?

I use a lot of scripts as GP Service almost all use the arcpy functions but one (and very important) of my scripts needs a gdal/ogr and numpy imports. I can run this script in PyScripter or as a tool ...
1
vote
3answers
123 views

Applying rotation before FeatureToRaster_conversion?

I am converting polygon shapefiles to rasters. With arcpy I am using the function FeatureToRaster_conversion. gp.FeatureToRaster_conversion(InFeatures, InField, OutRaster, InCellSize) This function ...
2
votes
1answer
98 views

How to use ArcGIS Data Interoperability tool in ArcPy?

I created an ArcGIS Interoperability Tool, which I like to use in my ArcPY script. In order to find the correct code I created an ArcGIS Toolbox Model including my Interoperability Tool, and exported ...
1
vote
1answer
112 views

How to create sequential field based on sorted data? (or extract pop-up data?)

I downloaded a kmz field and converted it to a GDB fc on arcmap. However, the field I need to label the layer by is stored in the pop-up html field... It looks like this: <html ...
1
vote
2answers
56 views

Call field from zip() into Field Calculator expression ArcGIS

I've been trying to find a way to call in field names from a zip(). Basically I have 12 fields called "Flw_days1", "Flw_days2" etc and corresponding "Depth" fields that need to be calculated using the ...
4
votes
1answer
795 views

Script tool Value ERROR 000735: Output Layer: Value is required?

I've been struggling to get my script tool to run without receiving the following error: <class 'arcgisscripting.ExecuteError'>: Failed to execute. Parameters are not valid. ERROR 000735: ...
3
votes
1answer
108 views

Creating a polyline from point data that represents multiple linear features in ArcGIS 10.0

I have a problem where I have to somewhow create a polyline feature class in ArcGIS 10.0 from points that were collected in the field using a Trimble GeoXT that represent the start and end of multiple ...
3
votes
1answer
211 views

Using ArcPy to run Report Layout File (RLF) report and add to layout (for Data Driven Pages)?

I currently have a data driven page template set up which I manually cycle through and for each page run a Report Layout File (RLF) report and then add this to the ArcMap layout. The added element is ...
0
votes
1answer
61 views

arcpy Make Feature Layer using a where clause

From a table of lines and polylines I am I'm building a seperate table of points (nodes) with their X and Y coordinates stored as attributes. I want the nodes to be unique, so I'm checking to see if a ...
6
votes
5answers
142 views

How to access adjacent rows with cursor?

In the attached screenshot, the attributes contain two field of interest "a" and "b". I want to write a script to access the adjacent rows in order to make some calculations. To access a single row, ...
1
vote
1answer
30 views

How can I do a definition query on a layer and zoom to it?

I am trying to do definition query to a layer and to zoom to the same layer, but I got an error ("SyntaxError: can't assign to operator") ?? dataFrame = arcpy.mapping.ListDataFrames(mxd)[0] # the ...