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

learn more… | top users | synonyms (1)

3
votes
3answers
70 views

How do I compare two features to test if they are identical?

What is the most efficient method for determining if two features (points, lines, or polygons) are geometrically identical? I'm not concerned about a square figure that contains eight vertices (four ...
0
votes
0answers
32 views

Consolidating spatial data for nearly 200,000 acre area

more of a broad question here: I'm trying to take a huge amount of spatial data for a specific 200,000 acre area, collected over 15 years dating back to 2000, and organize it. The data layers relate ...
1
vote
1answer
48 views

Getting aspect and reclassifying raster files using Python in a loop

By using Python in PythonWin 2.7.3, I tried to obtain aspect files of a list of raster files in a folder(called database_Dem20) and save it to another folder, database_Dem20/testOutput. In the same ...
1
vote
1answer
63 views

Creating polygon geometry using points array

I am parsing an Openstreetmap gpx file which I exported from here. I'm trying to put the data into arcgis geodatabase feature classes. Some of the features in the gpx are points (saved as wpt), while ...
1
vote
2answers
34 views

Adding new field and populating with shapefile name

I have a set of shapefiles that need a new field adding to them called "Policy_Ref". I then need to update this field with the shapefile name. However when I do, it uses the full title, including the ...
0
votes
0answers
37 views

Summarize an attribute table using python

I am a trying to summarize an attribute table for a dataset that I have. The problem is similar to the one discussed in this question here: ...
1
vote
1answer
63 views

Python code that uses arcpy.describe skips if statement?

I have multiple shapefiles in a folder which I am trying to compare with same named features in geodatabase. I want to first clip them within a polygon and then copy and overwrite the features in ...
2
votes
1answer
37 views

Apply Symbology from a Layer

I am trying to update the symbology of a layer with another layer with a python script. I have written a code for this. But I am getting the following error message : ERROR 000732: Input Layer: ...
0
votes
1answer
31 views

arc.describe file name not working

I have multiple shapefiles in a folder which I am trying to compare with same named features in geodatabase. I want to first clip within an area polygon and then copy and overwrite the features in the ...
1
vote
1answer
42 views

Why does arcpy's Alter Field return “The tool is not licensed”?

According to the help file, the ALTER FIELD command is available at any license level. ArcGIS for Desktop Basic: Yes Why am I getting a license error when trying to rename a field alias on a ...
1
vote
1answer
33 views

What tool would be best for getting the max value out of Identical ID rows?

As the title may imply I want to keep the maximum value in field2 for several identical IDs in field1, the others are deleted for example this table: Field1 Field2 14772 1 14772 4 14766 3 ...
0
votes
1answer
17 views

Partial Text String replace for Standard Annotation Feature Class Inconsistent

We have several hundred mxd maps that contain standard annotation feature classes. Each map is of different municipalities and each annotation file includes municipal boundary labels. Depending on the ...
7
votes
0answers
229 views

Python toolbox works in ArcToolbox and in Python console, but not in ArcCatalog

I have a set of Python tools in a Python toolbox (.pyt). They are broken into multiple files and modules and have been functioning correctly, but now I'm seeing inconsistent behavior on multiple ...
1
vote
0answers
52 views

ArcPy reading a raster in a moving window?

I typically read large raster data using gdal and setting up a moving window of 256*256 pixels (for example). I recently had to do some processing using arcpy, so I did the same thing, using ...
0
votes
1answer
40 views

Change color of feature (active cursor row) with ArcPy

I have a selection of polygon feature and with a cursor loop I walk through them. I determine the extent of eachfeature and arcmap will zoom to the feature. My default selection color in ArcMap is ...
0
votes
0answers
21 views

How to `Enable SQL Access` through ArcPy 10.2

I have a multiversion view for a feature class. When I add any field in feature class, it does not reflect on its multiversion view. I have to manually right click on feature class -> Manage ...
1
vote
0answers
14 views

Quickest way to Read 3D Area from arcpy.SurfaceVolume_3d?

What is the most efficient way to access just the 3D Area result from an arcpy.SurfaceVolume_3d calculation? I have the tool running as described ...
0
votes
2answers
49 views

Applying symbology to a layer with python, How to only have symbology in TOC that the sub layer has

i am trying to apply a symbology to multiply layers that i have created from one feature class. The original feature class is used to create several sub layers see layer loop this involves using ...
1
vote
0answers
25 views

ReconcileVersions tool yields ERROR 000301

I am wanting to create a version, step into the version, make edits, and then post and reconcile that version. When I get to the ReconcileVersions_management tool, it is giving me ERROR 000301: The ...
1
vote
2answers
55 views

ignore Null Values when iterating through fields with python

So far I have a code which iterates through Fefature Classes and ignores all fields of type String, Geometry and OID. I now try to add some lines which tell python to ignore all NULL values when ...
0
votes
0answers
51 views

Error in importing arcpy in arcgis python console

I have been coding in eclipse using arcpy 64 bit. the pythonpath in eclipse is set to the 64 bit, the pythonpath in environment variables is also set to the same address. but when I want to improt ...
1
vote
1answer
63 views

Compute annual mean of overlapping cells using daily rasters

I am stuck at somewhat simple looking calculation. I have daily temperature rasters from 2001 to 2014 with following name format: `2001001` `2001002` | | `2014365` I want to compute annual mean ...
0
votes
0answers
41 views

After execute arcgis script, what happen with the variables?

After the execution of a Arcgis script (I wrote the script in python language) on a Arcmap session. What happen with the variables that I used in the script? They remain stored somewhere in ArcMap (So ...
3
votes
2answers
92 views

Displaying estimated computational time when running tools in ArcGIS for Desktop?

I'm almost positive I have set up models to display the estimated runtime/computational time for the models/tools in the past, but I can't seem remember how to turn on this option. I've looked around ...
2
votes
1answer
35 views

How to set empty date field with arcpy.CalculateField_Management?

I want to simply set my date field to empty i.e "". No problem directly in ArcGIS , but with arcpy I can´t seem to get the syntax right. When I try with a date this is no problem e.g '22.06.2015' But ...
1
vote
0answers
48 views

How to automatically generate pour points along stream network?

The following screenshot shows the results of a water flow analysis where I identified stream order via the Strahler method in ArcGIS. Now I need to generate watersheds for 2nd order streams and ...
0
votes
1answer
61 views

arcpy.da UpdateCursor where_clause

I am trying to get a where_clause working on a UpdateCursor (arcpy.da). I can get it to work fine with a SearchCursor, but for some reason the same clause throws a RuntimeError: General function ...
2
votes
0answers
51 views

Using Python to iterate through directory to create event layer and perform kernel Density for each file?

I am new to Python for ArcGIS, but have been using ArcGIS a while. I have a large directory of tables with point data. For each file of each folder I want to create a kernel density layer. I have ...
0
votes
1answer
35 views

Using Python to Union two polygons from separate gdb? [closed]

I'm in the processes of learning python and am stuck on an exercise. One part of the exercise requires me to union a polygon from one gdb with a polygon in another gdb. Here is what I have, which ...
2
votes
2answers
77 views

definition query with 3 plus variables to loop with python and save layer files

I have a script that takes an input feature class and uses a field within this class to create a definition query for each unique field. A question on how to do this is listed below saving layers for ...
0
votes
1answer
18 views

arcpy CSV file to raster attribute table?

Using TableToTable_conversion I can convert a CSV file to a table in a geodatabase, but how can make this table be the default attribute table for a raster in the geodatabase? I can't seem to find ...
0
votes
0answers
53 views

Configuring Python to avoid conflict with ArcGIS for Desktop (ArcPy)?

I am trying to find the best way to configure a new version of python in my computer (windows) so that I do not have any problem with the python version that I have with ArcGIS. Is there anyway to ...
1
vote
1answer
26 views

Why is there a lock when using arcpy.DeleteField_management in arcgis 10.0?

This code only works when ArcCatalog is closed or the featureclass has never been opened by ArcCatalog. For other arcpy management functions this is not the case, but when ArcCatalog is open, I get ...
1
vote
1answer
54 views

How can I programatically set the “Description” for a ArcPy Geoprocessing Service?

When I create a Python Toolbox (pyt), I set the name and description of the toolbox. When I create the parameters, I can set their name, type, default value, in/out, etc. Basically, everything that ...
0
votes
1answer
57 views

ArcGIS 10.0 Python script not working with ArcGIS 10.2.1. Looping through SelectLayerByLocations

Last year I got assistance from StackExchange to write a Python script for ArcGIS 10.0 which loops through SelectLayerByLocation with buffer until it returns no new rows. Then it uses the selection ...
1
vote
1answer
18 views

Calling a variable in SelectLayerByAttribute

I am trying to code a Python add in for ArcGIS 10.2. I have a shape called FACILITIES which contains facilities, a field CATEGORY and I wish to select all the entities that are categorized as "school" ...
2
votes
2answers
92 views

Ignoring field types in Python list returned by arcpy.ListFields()?

I am generally just wondering if there is a nice and easy way in python to ignore all fields of a specifiy type (eg string) in a feature class. At the moment I am doing it with field_names = ...
1
vote
1answer
23 views

Field mappings object not functioning with Merge_management

I'm trying to limit the number of fields when I perform a merge to two. Below is the script I have created to do so. However, the merged feature class carries over all fields, despite my use of a ...
0
votes
0answers
27 views

SQL fails in python. In ArcMap error FDO error: -2147024871 returned

I'm having issues with an SQL expression for a feature class in a file geodatabase. When working in ArcMap, the SQL will fail on its first attempt, and produce the following error: However, when I ...
1
vote
0answers
23 views

Why is arcpy ChangePrivileges_management adding a second feature class to map?

I am new to GIS and pretty new to python, so sorry if this is ugly code. I am creating a feature class in a postgres database if it does not already exist and the user wants it created. That works ...
0
votes
1answer
61 views

cannot concatenate str and list objects

I'm trying to rename a group of rasters to "I1986_" + [The 1st 3 letters of the raster]. For example, if a raster is named "Raster1", the output would be "I1986_Ras". I've tried including str() ...
1
vote
1answer
42 views

How to replace field name with a variable in exported whereclause?

In the select by attribute how do I replace "AADT", with a predefined string variable? I don't understand the pattern in "\"AADT\">=" , can you please explain why is it that way when exported from ...
0
votes
1answer
62 views

Python Script to Select records based on user input

I am running Arc 10.3 in a versioned environment. I am attempting to write a simple code that will select service records coming from Oracle CRM to a separate feature class containing only records ...
1
vote
1answer
32 views

How to search for fields in a GDB and add them if they don´t exist with arcpy?

I have a list of files that need to be present in my featureclasses - myFields[]. I need to add these fields if they are not present in my FeatureClasses. import arcpy myField="Field01" myFields = ...
0
votes
0answers
21 views

Assign a dummy value for removed features in a Polygon-Grid

I want to calculate the entropy index for landuses classes for an area based on a 100m Polygon Grid. I did find an existing toolbox that does all the required calculation. Input features are the 100m ...
4
votes
2answers
173 views

Fastest way to numerate intersecting polygons in ArcGIS

I need to numerate a thousands of polygons in groups, so each group will get unique number. Every intersecting polygons is unique group (see picture). So polygons have field "groups" with values: ...
0
votes
1answer
54 views

TypeError: value #0 - unsupported type: datetime.timedelta

The following code runs fine minus receiving the error below, which doesn't make any sense (to me) as I have other UpdateCursors and perform UpdateRow(row) with other date values. As can be seen ...
1
vote
2answers
64 views

Export feature classes in geodatabase to CSVs

I am trying to export feature classes within a geodatabase to CSV format using "Export Feature Attribute to ASCII" in ArCGIS. I am getting the following error Traceback (most recent call last): ...
2
votes
2answers
66 views

How to access Spatial Analyst extension from stand alone script?

If I run this script: import arcpy arcpy.AddMessage(arcpy.CheckExtension("Spatial")) from arcpy.sa import Con from arcpy import env fDir=r'd:\scratch\fdir' outFolder=r'd:\aerials\images' ...
2
votes
1answer
79 views

How to use %i%“.csv” in arcpy to name an output csv file?

I am using arcpy to describe datasets and output the results into a csv file. I am doing this via a script in arctoolbox and would like to save the file in the same folder as the file being analysed. ...