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

learn more… | top users | synonyms (1)

0
votes
0answers
20 views

ArcGIS Server throws an exception

I have a script in Python, that works well when I ran it in ArcMap. When I tried to execute it in ArcGIS Server as a service I got error this error: Failed to execute. Parameters are not valid.  ...
-3
votes
0answers
42 views

GeoProcessing Tool select by location (SWITCH SELECTION)

Right now i am working in Geo processing tool select by location i have use switch selection in arcMap python window (relationship passed "" & selected feature passed "" & search distance ...
0
votes
0answers
34 views

Cannot assign name to resultant terrain using ArcPy so cannot save result?

Question of python in ArcGIS: I can not assign a name to the resultant terrain, thus I can not save the result. I'm new to arcpy. By a piece of script using SetNull() in Raster Calculator, I want to ...
0
votes
1answer
33 views

Arcpy to append results of pivot table

Good Day All, So I have a script that does some processing but the main part are two things run a multiple ring buffer using arcpy.MultipleRingBuffer_analysis and four rings do some zonal ...
3
votes
2answers
106 views

Efficient ways to read table data from a large feature layer?

I have a feature layer that contains about 460,000 records and it currently takes about 20 minutes to read that table using the arcpy.da.TableToNumPyArray() tool. Is there a more efficient way to read ...
1
vote
1answer
31 views

NumPy Array to Feature Class: NameError from Inner Loop Variables

I have a NumPy Array to FC script that parses a JSON web-service. The outer loop writes to my FC correctly, however my inner loop variables come back as not defined when appending the items. The ...
1
vote
1answer
46 views

Output the Search Cursor as a string

I am trying to select Zones that intersect the dataframe (polygon). If there is only one return then I want to turn it into a sting. If there is multiple I want to turn it into a string with " ," ...
0
votes
0answers
17 views

Error 010240 when calculating mean of a list of rasters - Cell Statistics

I'm trying to calulate the mean value of a list of rasters but I am always getting the following error: RuntimeError: ERROR 010240: Could not save raster dataset to < value > with output format ...
1
vote
1answer
51 views

Why does Select Layer By Attribute give errors 000622 & 000628?

I try to select line segments from a layer "t_Pavement_Line which is open in TOC using the following line: arcpy.SelectLayerByAttribute_management("t_Pavement_Line", "NEW_SELECTION", ...
0
votes
3answers
84 views

Combo box in python add-in for Arc - keep selected value visible

This seems like a basic question that I cannot figure out. I have looked through other questions on gis.stackexchange and not found it, so forgive me if this is elsewhere. I have a python add-in for ...
1
vote
1answer
80 views

Python script to summarize layer properties

I recently found this layer properties script that summarizes layer properties in a single file or a directory and all subdirectories: ...
0
votes
1answer
42 views

address standardizer code in python for street featureclass

In my system I have featureclass Street and having fields. Featureclass : Street Input fields: NAME;STREET_PREFIX;STREET_NAME;STREET_TYPE;STREET_SUFFIX output fields: ...
1
vote
1answer
77 views

Map automation to iterate through attribute table using ArcPy?

I have a python code which iterates through all attribute fields and creates a map for each field automatically. However, in the code I have to specify each attribute manually which was fine so far. ...
0
votes
2answers
55 views

Python Crashes when Running ArcPy's ExportToPDF(), ExportToPNG(), ExportToJPEG()

I am attempting to loop through a folder of ~400 .mxd's and save each to a .pdf in another folder. All tested arcpy.mapping export functions (pdf, jpeg & png) kill python without a chance to ...
1
vote
3answers
56 views

Script won't delete feature classes from file database using ArcPy?

I wrote a script that creates a GDB using a designated parish/county name and then does a selection by location and extracts from another db to the newly created db. This all works fine but there are ...
1
vote
1answer
48 views

Debugging/logging ArcPy / Python code behind ArcMap function?

Considering I Can use the right click --> set datasource at an mxd file to change the datasource. The following pictures describes how this can be done in arcmap.. How can I see the arcpy / python ...
4
votes
2answers
109 views

How to Parse Unique Address Data

I'm trying to parse some funky address data into separate fields either using ArcMap's Field Calculator or a Python Script. Currently, my address data including street number, street name, and ...
2
votes
3answers
108 views

Best way to delete many fields from many feature classes using arcpy?

I'm currently formatting our GIS data for use in a mobile app. The purpose of altering the data is to reduce the output file size that's imported into the app. I need to delete many fields from many ...
3
votes
4answers
87 views

Python Script create spreadsheet with exception

In the following Python Script, I would like to create a spreadsheet (Excel would be fine) with the Exception results instead of just printing "There was an error--->..." to be able to keep track of ...
0
votes
0answers
25 views

batch save MXDs to group layer files using ArcPy

Does anyone have / know of a script that converts all the MXD`s in a folder to individual group layer files ? It needs to use the MXD name as the group layer file name.
1
vote
0answers
25 views

Dynamic segmentation with respect to a control factor

Is there a way either with python scripts or other solution to dynamically segment a table with linear measures (from-to fields) Each segmented section (from-to) should have all the item numbers ...
1
vote
0answers
57 views

Compression Algorithms output files larger than the originals. Why?

I'm currently attempting to write a script that will compress a few hundred .tif files. I've tried two approaches, first I wrote a script in Python using CopyRaster_management() function and the ...
0
votes
0answers
10 views

ArcREST PublishCSVParameters error

I am consistently receiving this error when trying to publish a CSV as a hosted service. My only hunch is that the layerinfo variable is incorrect, however by the ArcGIS documentation I am passing ...
0
votes
0answers
9 views

How to track changes in feature class so as to update only the specific locations in cached service

I have a non versioned enterprise geodatabase. I need to know when a feature class changes, and which features have changed every time. I need this for updating only specific tiles in a cached map ...
3
votes
1answer
67 views

How to remove a specific unique value with arcpy

using arcpy, i would like to remove,from 50 mxd files, a specific unique value called "residence a" (exist in 3 layers) from the table of content. so i will get this result: The value of ...
0
votes
0answers
19 views

Switch selection in geoprocessing [duplicate]

I have to use Geoprocessing tools. my requirement is compare features in Source PGDB with Target PGDB in case target pgdb having extra captured feature list export as a shape file right now i am ...
-1
votes
0answers
46 views

Why does Select Layer By Location with SWITCH_SELECTION hang?

When I try to follow the solution offered at How to SWITCH_SELECTION after Select Layer By Location in ModelBuilder?, which I think should work the process hangs. Is there something that I may be ...
1
vote
1answer
37 views

Export attributes of shapefiles into text file

I'm trying to export attributes of multiple shapefiles a text file. I am multiple getting errors when I run my code not sure what the issue is. Any direction as to where to start to fix this would be ...
2
votes
1answer
33 views

Setting Two Definition Queries as Parameters in Python Script tool causes: RuntimeError: LayerObject: Set attribute definitionQuery does not exist

I created a script that adds definition queries to every layer in an mxd depending on the layer name. This worked fine as a stand alone script, but when I try to use it as a script tool with ...
1
vote
1answer
77 views

Getting index of active data frame in ArcPy?

I am a little surprised to see that there seems to be no way to get the index of the active data frame in ArcPy, or did I miss something? For example, what if you want to add a tool’s output to the ...
0
votes
1answer
42 views

Deleting output shapefiles which have no data/features using ArcPy?

Still working on cleaning this up but it runs fine. Below is the rough code for a tool that iterates through field rows and clips accordingly to that row's shape. Everything outputs nicely but there ...
1
vote
2answers
49 views

Can you access all tools in python/arcpy regardless of license level?

Is it possible to write a python script using arcpy that is for a tool not included in the current desktop license level? For example, write something using the Identity Tool when you only have a ...
0
votes
1answer
31 views

Python Script to batch compress .tif files using LZW compression

I am currently trying to batch compress a folder of .tif files using LZW compression in order to free up storage space. I've been using this script in ArcMap's python window, adapted from here: # ...
2
votes
2answers
104 views

Trying to re-project a folder of shapefiles using Python Script

I am trying to reproject multiple shapefiles in a folder. When I run my program this is the error I am getting: line 8221, in Project raise e ExecuteError: Failed to execute. Parameters are not ...
1
vote
2answers
67 views

Python Script to Add Multiple Fields to Feature Classes

I am trying to add 2 (multiple) fields to each feature class in a gdb. I based the script off of Python Script to Add Fields to Feature Classes. I feel like I am missing something and can't figure ...
0
votes
1answer
23 views

How to combine two rasters based on the relationship to a polygon mask?

I am looking to combine two single-band, 1-bit rasters of the same spatial extent based on their relationship to a polygon (mask). The image shows a polygon displayed with a cross-hatch and the two ...
1
vote
1answer
59 views

Using Spatial Join to copy a single attribute

I am attempting to use Spatial Join to combine tax parcels and zoning information, such that the parcels contain the designation of the underlying zone. However, I only want to take the "esmZONE" ...
-1
votes
1answer
27 views

Writing Python Code to create a Median tool in ArcGIS 10.2

I am attempting to write the code for a toll in Python that will effectively: access the city data and load it, if it isn't already in the list of layers get a country name from the user and access ...
2
votes
1answer
62 views

SelectLayerByAttribute and Where Clause

I'm trying to select the minimum value from a field to select and export that one feature to a temp shp so I can copy the field data from the point to a line. So far I have this: import arcpy from ...
0
votes
0answers
30 views

Error 010092 for FeatureToRaster in Pythonwin

would someone be able to help me with this problem. As shown the process works for three files (of approx 1000) and then throw the Error 010092: Invalid Output Extent. All the files have been ...
3
votes
2answers
76 views

Looping field name change

I need to alter all of the field names through multiple feature classes. I have a pretty good idea of which tools to use but I'm not sure how to loop them through each feature class and each field. ...
4
votes
2answers
109 views

How to randomly move points?

I have a feature class with a large amount of points. My purpose is to randomly move these points to see what happens as a result. Are there specific tools or Python programming methods to accomplish ...
1
vote
1answer
34 views

ExportToPNG with definition query for unique values?

I have a MXD with a layer that has a field that has many values. I need to export multiple layouts to PNG, applying a definition query to show the unique values for that layer. i.e. Just show the ...
0
votes
2answers
41 views

Using SQL query with ArcPy?

I'm creating a tool that when you type in the city name it will select the city, zoom in and label it. I have the zoom and label working but can't figure out the SQL Query needed to select the city I ...
0
votes
0answers
29 views

How to geocode automatically through ArcPy without runtime error?

How to geocode automatically through ArcPy? My code always runs into runtime error. # Import system modules import arcpy # Set local variables: address_table = "C:\Users\Sibo\Dropbox ...
0
votes
0answers
36 views

Error when kriging: “output variance prediction raster”

I am trying to run a python script for kriging, but keep getting a following error message. It doesn't make any sense as the output variance prediction raster is optional. The code: # Create ...
2
votes
0answers
25 views

How to run Focal Stats on specific values in python

I'm a beginning programmer and am new to the site but it has helped me quite a bit so thank you! I'm trying to recreate a raster calculator operation using python scripts but am having a hard time ...
1
vote
1answer
32 views

ArcCatalog and python crash when running ConvertTimeField_management

I have a script which reclassifies a tif file, adds a new field to the tiff, and is supposed to parse the date from the filename and add it to the new date field. Everything works as it should, ...
0
votes
1answer
64 views

Geocoding arcpy slow startup time

When scripting with arcpy.GeocodeAddress_geocoding (http://resources.arcgis.com/en/help/main/10.2/index.html#//002600000006000000), there's always a major lag to start up the geocoder. The issue here ...
1
vote
1answer
29 views

Keeping layer name when exporting to CAD?

I am trying to export selected features from layers from SDE into a DXF using python, but it does not retain the layer name. But if I do it manually using the ArcToolbox tool, it does work. Example ...