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

learn more… | top users | synonyms (1)

4
votes
1answer
60 views

Arcpy Cell Statistics - maximum number of input rasters

I am running cell statistics in arcpy. Essentially I am summing together a folder of grd files to create a new grd representing their sum This will eventually take place on a folder of 20,000 raster ...
1
vote
1answer
55 views

Model Builder or a python script for pulling SDE data in a single GDB file

Would like to know if Model Builder or a Python Script would be better for pulling dozens of fc from ArcSDE into a single .gdb file ? The tool will need to be run on a regular basis.
3
votes
1answer
29 views

How to find the distance between start of line and start of raster with arcpy/python?

I'am creating a python script tool for ArcGIS Desktop 10.1 to extract profiles. I’m using stack profile to extract values to a table but stack profile only outputs values where the line and raster ...
2
votes
1answer
75 views

ArcPy inconsistently accepts SQL queries for MakeFeatureLayer or SelectLayerByAttribute

I need to buffer a subset of features in a particular feature class. To do this, I am first creating a feature layer (using a SQL query to select only what I want), and then running Buffer. So my ...
2
votes
1answer
41 views

How to save MakeNetCDFTableView output?

I was trying to extract the time-series data from the netcdf using grid points (lat/long) by MakeNetCDFTableView. I have more than 100 grid points and I want to extract the data from the netcdf file. ...
-1
votes
1answer
32 views

Is there a method in ArcObjects that is equivalent to ArcPy's: SelectLayerByLocation_management?

I have 2 IFeatureClass and I want to do an INTERSECT between the two. What is the best way to do this from ArcObjects?
8
votes
2answers
309 views

Does dissolving features improve geoprocessing efficiency?

I have a large set of line data (>140,000 features). Is there a processing advantage, in either time required or (more importantly) memory used: to running Dissolve on the data before running ...
1
vote
1answer
41 views

Overwrite option on a standalone ZonalStatisticsAsTable using ArcPy

How can I code an "overwrite option" on a standalone ZonalStatisticsAsTable using ArcPy? I don't see any overwrite option from a Esri example. # Execute ZonalStatisticsAsTable outZSaT = ...
1
vote
0answers
55 views

Cause of Error 000308: Invalid Field Type when batch running ArcPy script?

This is my first post on this site. I am using ArcGIS 10.2 for Desktop. I wrote a simple script in the form of a python toolbox to calculate the speed of travel between consecutive entries of a ...
2
votes
1answer
63 views

How do I rename rasters in an mxd by using my csv?

I have the following data in a csv: RasterName First name Raster 1 Aaron Raster 1 Paul Raster 2 Bryan Raster 3 Cranston Raster 3 Vince I have added these ...
2
votes
3answers
153 views

Clipping faster (i.e. in bulk/batch) in ArcGIS for Desktop?

I have 100 different input vector layers and one clip feature vector layer. I have to clip them 100 times but its a large amount of work. Is there any Python script (ArcPy) in ArcGIS for Desktop ...
3
votes
1answer
64 views

How write query in “Select_analysis” that compare string from one column with another column?

I have a shp file (s.shp) with column "A" and column "B". I try copy from this file only that rows where string value from column "A" is part of string value from column "B" e.g. A 0.1 0.2 0.3 ...
0
votes
0answers
66 views

Cause of ExecuteError: ERROR 999999: Error executing function from Spatial Join?

I'm trying to use the spatial join to append rows to my target feature from my join feature. Here's my code: #import the module import arcpy from arcpy.sa import * from arcpy import env ...
2
votes
0answers
65 views

Converting KML To Layer using ArcPy losing objects?

I am trying to a convert kml file to a layer using python. This is my code: import arcpy arcpy.KMLToLayer_conversion('C:\kml\\result.kml', 'C:\kml', 'result') But the layer has lost a lot of ...
2
votes
1answer
61 views

Using auto increment code with counter

I was wondering if it's possible to use the standard auto increment code to work on groups of records: FeatureClass = "newFC" recs = collections.defaultdict(int) autoIncrementEXP = "autoIncrement()" ...
2
votes
1answer
155 views

Python Syntax Error when running Python Snippet of successful geoprocess

I am having an issue with a simple python snippet. Here's the background: I wanted to include an additional step in a nightly update script that replaces characters in a field that simply do not play ...
1
vote
1answer
42 views

Specifying output coordinate system in ArcPy

I'm updating somebody else's old Python scripts, and trying to make sure I understand their logic and desired outputs while streamlining the code. In this particular script, it specifies an output ...
0
votes
2answers
33 views

TIN to Raster - specify raster's origin

How could I specify raster's origin, while using arcpy.TinRaster_3d?
1
vote
0answers
133 views

Copy Features giving ERROR 000210: Cannot create output in ArcPy?

I have an issue where I'm trying to save separate feature classes for each route in an already solved closest facility problem, and one seemingly arbitrary route won't save. I tried to look at the ...
0
votes
1answer
29 views

How to resolve ERROR 010271: Raster does not have an attribute table?

From my code which builds least-cost paths between several polygons by using the functions "CostDistance" and "CostPath" of ArcGIS , I obtain this error message: ExecuteError: ERROR 010271: Raster ...
2
votes
1answer
65 views

RuntimeError: Field is not editable when using InsertCursor on ArcSDE geodatabase with ArcFM installed?

We are running ArcGIS Desktop 10.1 SP1, and also have ArcFM installed. I have this simple code: workspace = "C:\\my.sde" arcpy.env.workspace = workspace edit = arcpy.da.Editor(arcpy.env.workspace) ...
1
vote
1answer
58 views

arcpy searchCursor numeric variable in where clause

I know this question has been answered but I am not seeing an adaptation that I can understand. I am trying to use a numeric variable in a where clause and just having a hard time figuring it out. ...
1
vote
0answers
56 views

Making Map with Color Ramp Using SQL Database Intergration?

This could be a trivial question, but I've been kind of stuck on it for awhile. I'm trying to construct multiple maps that reflect aggregated data showing overall risk by county in a SQL Database ...
4
votes
2answers
83 views

How to access raster NoData value?

I am trying to programmatically access the NoData value in a raster dataset as shown in the screenshot. Two tools that come to mind to describe raster properties do not seem to be able to describe ...
1
vote
0answers
71 views

Cause of Field Calculator UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 5: ordinal not in range(128)? [closed]

def Befahrung(value1,value2): if value1 is ' ': return ' ' else: return "G:\\Example\\" + str(value1) + "\\File_" + str(value2) + ".pdf" I try to create a field with a hyperlink. It works ...
1
vote
1answer
52 views

How to get Last ObjectID of feature class using ArcPy?

I have a feature class and I need to know the ObjectID of its last record. What is the best way to find out last ObjectID? Opening a search cursor and reading all the records is one way, but is ...
0
votes
0answers
48 views

How do I change graduated color class values with python?

I am trying to use python to adjust my graduated color symbols' class breaks and labels. The layer is a query layer tied to an SQL DB and I want to be able to execute my python (after the database has ...
1
vote
2answers
81 views

arcpy.mapping.Layer error when working with files over multiple dataframes

I can get the following code to run in an mxd with a single dataframe. I need it, however, to run and loop through an mxd that has multiple dataframes with identically named files and data sources to ...
2
votes
1answer
45 views

Populate a layout text element with the description from a coded value domain

ArcGIS 10.1+ lets you easily put dynamically populated text boxes in your print layouts. Doing so puts some text in the text element that looks something like this: <dyn type="page" ...
2
votes
2answers
40 views

Performing a Python scripted tool based on whether a field is populated or not

My question is if I'm running the ArcMap Dissolve tool through a Python script, how can I tell it to check for attributes in one field, and if that field is empty, to perform the tool on another ...
1
vote
1answer
93 views

How to merge Shapefiles from multiple folders into Geodatabase Featureclass?

I have a question regarding the merge of a lot of folders, which has a lot subfolders, which has the shapefiles stored. I would like to merge all those in one geodatabase. So I thought to use a ...
1
vote
3answers
80 views

How to generate automatically the name of output parameters in a python script tool? [closed]

I have some Python script tools in ArcGIS for Desktop. I need to reproduce what all geoprocessing tools do when the first input parameter is introduced: autogenerate a workspace and basename for the ...
1
vote
0answers
50 views

How to batch process near feature distance in ArcGIS

I have 2000+ point shape files. These are all GPS tracks. I want to calculate the distance from each point to the nearest feature (road, train line, restaurant etc) within a 30 meter radius. I am ...
4
votes
1answer
77 views

Changing value field when applying symbology from layer using Python Add-in?

I have a python addin button that creates a layer file from a polygon feature class in ArcMap. I want to take that layer file and, with user input from a combobox, apply it back to the feature class ...
2
votes
1answer
60 views

Map algebra from files in multiple directories

I'm a rookie in python programming. I want to do map algebra for multiple rasters but these rasters are in different folders. Here's the code ive created so far: #Importing modules import arcpy from ...
4
votes
1answer
109 views

Renaming 1,200 rasters in File Geodatabase using ArcPy?

I've been tasked with renaming a large amount of raster files within a file geodatabase (ArcGIS style). I'm taking weather data which has a name format as such: "G"mmddhhhh I'm trying to add a year ...
4
votes
1answer
115 views

arcpy - ascii encoding error when updating field content in SQL Server table

I know there are plenty of posts and blog explanations about unicode errors, but I still can't figure out to handle it in my particular case. So here is my problem: I am writing a Python script to ...
2
votes
2answers
48 views

Running ArcGIS Data Reviewer using ArcPy?

I want to run the ArcGIS Data reviewer in Python code, to check domains. My scenario is check the attribute values if its meet the domain value. Is it possible to run ArcGIS Data Reviewer in ...
1
vote
2answers
51 views

Creating shapefile from selection - remove from map

I am iterating over a shapefile and creating a new shape from each row. I will be creating several thousand individual shapes and do not want to inundate my TOC with that many layers (I bet ArcMap ...
4
votes
1answer
61 views

How to extract certain values from a table using the SearchCursor Tool

I am trying to write a python script to extract certain values from a table: the table I am referring to is a big collection of nitrate values for different water depths, which are deposited in the ...
1
vote
2answers
56 views

Run FME Script in batch file using .NET

Encountered another roadblock. I have a working FME script that I want to automatically run using a console app. I created a simple batch file which accepts a MDB file path as parameter: fme.exe ...
2
votes
2answers
74 views

What is the most efficient method to iterate geoprocessing operations through an attribute table?

I want to calculate the clipped raster layer percentage for a shapefile consist of overlapping polygons, since ArcGIS doesn't support tabulate area for overlapping features, so I used a loop to ...
3
votes
0answers
41 views

ArcPy: Initialize zero valued grid Raster and iteratively increment

I'm jumping right into ArcPy to help out a friend who needs to automate some ArcGIS work. The problem at hand can be reduced to the following pseudocode: accumulationRaster = SomeZeroedRaster for ...
1
vote
0answers
33 views

arcpy: changing lyr data source (raster layers)

I am trying to create a lyr file for each raster file in a folder. To get exact same display settings I thought I would create a lyr file, then, using arcpy copy-paste it for each file in folder and ...
1
vote
1answer
36 views

Determining active layer regardless of its name using ArcPy?

ArcPy has a method of defining an active map regardless of its filename or path: mxd = arcpy.mapping.MapDocument("CURRENT") I wonder if there is a similar way to define an active layer. I need it ...
2
votes
2answers
124 views

Python Window Crash and import arcpy issue

Trying to do anything in the Python shell within ArcGIS 10.2 and it just crashes once I hit enter after writing code, no matter what I do. I've tried to uninstall, deauthorize, reinstall, ...
2
votes
2answers
54 views

Arithmetic on rasters with variable names in Map Algebra/Spatial Analyst?

I'm a Python (and StackExchange) novice trying to figure out how to perform calculations on temporary rasters with variable names. My attempt at a minimum working example is below, but I would ...
-2
votes
1answer
71 views

Inserting new Text Element into MXD using ArcPy? [duplicate]

I'm using Desktop 10.2 and I tried with this script to add new text element "road 90" to a lot of mxd's, but Something wrong with the code: import arcpy from arcpy import env env.workspace = ...
2
votes
0answers
17 views

Modelbuilder only outputs Info files and logs [closed]

I am developing a processing algorithm in ArcMap ModelBuilder. When I run it everything seems to work fine and running to completion. However when I go check the output directories I only find Info ...
2
votes
0answers
23 views

Using arcpy.StackProfile_3d within arcpy addin

I want to get elevation profile in ArcScene using arcpy. Specifically, I want to create tool used as follows: click tool button, draw line interactively and output a graph presenting elevation ...