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

learn more… | top users | synonyms (1)

0
votes
0answers
6 views

Arcpy unzipping script: ERROR 000714 Error in executing: cmd.exe /C

I wrote script for unzip archive with GDB. It works locally, i.e from ArcGis Desktop. But when I publish scrypt as geoprocessing service, it doesn't work - ERROR 000714: Error in script Zip22. Error ...
3
votes
1answer
167 views

ArcPy script stops running randomly with no error returned

I am doing a batch watershed and analysis process on 135 points. This script worked great the first time I ran it. Ever since the first time, however, I have had the script stop at random moments. ...
0
votes
1answer
64 views

Create and Find Shortest Path

In my project, I need to calculate each village's distance along a route to a seaport. However, as you can see in the picture, not all the villages are connected to roads already, so, first of all, ...
3
votes
1answer
138 views

DBSCAN gives “AttributeError: NoneType has no attribute issparse”

I am running a Python script invoking the DBSCAN tool to cluster feature points. When I open ArcMap, load the feature layer, and run the script, it works the way I expect it to. But if I run it ...
0
votes
1answer
13 views

“select by attribute” error, when using getParameter

I'm developing an ArcGIS tool by Python. Below is a part of the inputs: StudyArea = arcpy.GetParameterAsText(0) LandCover = arcpy.GetParameterAsText(1) gridcode = arcpy.GetParameterAsText(2) ...
1
vote
1answer
17 views

Align and reshape polygons based on surrounding polylines

I am trying to use a shapefile with polygons and I am trying to align it to a road network, that the polygons align themselves to surrounding streets. Is there a way to automatize alignments between ...
1
vote
0answers
20 views

ArcGIS python add in to call python script for importing mdb data

im trying to change from a .net toolbar to a python toolbar in ArcGIS 10.2 and am having some difficulty. I have some stand alone python script which i know works and does what i need to do but i ...
0
votes
0answers
25 views

Insert NULL value in Arcgis table with python

I want to insert python tuples into an arcgis table. As you can see below pylist has some empty values (' ') which is basically 'String' type. These should be inserted as NULL in arcgis table field. ...
0
votes
2answers
38 views

How to get the parameter defined in one tool to another tool in same python toolbox?

This is what I am looking for: Create two tools in Python Toolbox: Tool1 and Tool2 (I am able to do that) I want to define a parameter in Tool2 whose value depends on parameter entered by user in ...
3
votes
4answers
59 views

Debugging ArcGIS Python scripts

I am new to Python and coding generally, and I cannot figure out how to set up a debugger that will work with Arcpy. I am trying to use PyCharm, but it always gets caught up with the fact that it ...
2
votes
1answer
343 views

Saving a ArcMap layers RGB values into the attribute table

I am wanting to take a symbolized layer in an mxd, and save it's symbol color (like a polygon fill) into its attribute table as an RGB value. My goal is to use this value in MapInfo to symbolize it's ...
1
vote
3answers
82 views

arcpy.mapping.MapDocument(“CURRENT”) fails when running python script in background as tool

The engineers I work with have requested an autosave feature for ArcGIS, so I thought I'd make them a python tool that routinely saves. The script works fine when run in the foreground, but fails when ...
3
votes
1answer
73 views

Why does arcpy.ListFeatureClasses() take so incredibly long?

I'm having an issue where calling arcpy.ListFeatureClasses() in a workspace with 400 shapefiles takes a very long time (more than 10 minutes). Using the os module to achieve the same effect takes ...
0
votes
0answers
19 views

How to dynamically create new parameters based on previously entered parameter in python toolbox?

This is what I am looking to create in a python toolbox: Create a parameter to get geodatabase (.gdb) file from the user. (the .gdb file has some number of feature classes) After user enters the gdb ...
2
votes
1answer
34 views

Calculate Row if Row Value Equals Value in List

I have a folder of photos named with a building ID that corresponds to a building ID in a building footprints feature class. Not all rows in the footprints feature class have a corresponding photo. ...
0
votes
1answer
15 views

Update Description of Feature Class in SDE or GDB

I need to add a Description to a Feature Class using arcpy. The feature class lives in our enterprise geodatabase. The Feature Class does not live in an MXD file, nor will it ever for this script's ...
1
vote
1answer
58 views

Check fields data type before insertion to table

I am trying to insert a python list of tuples to arcgis table. there is type mismatch which is obvious. Each Value in tuples have different type and fields in table have different data types. So, ...
1
vote
1answer
35 views

Arcpy.da.SearchCursor to retrieve the min and max measure values from Polyline-M shape

Is there a way to use a search cursor in ArcGIS to read the minimum measure and maximum measure values of a linear referenced route layer using arcpy? My goal is to build a route event using the start ...
0
votes
1answer
25 views

Copy shapefile to SDE feature class using arcpy

Is it possible to copy shapefiles to SDE geodatabases using ArcPy? I have tried using Copy_management, but it says that it cannot copy between different workspaces. Is there a different function that ...
0
votes
2answers
36 views

How do I go from the results of Calculate UTM Zone (Cartography) to a spatial reference object?

Calculate UTM Zone (Cartography) assigns a UTM zone to each feature within a feature class as a field value. The value returned is a 'UTM spatial reference string', which is a long string that looks ...
0
votes
0answers
31 views

ArcGIS Server geoprocessing service throws ERROR 000732: Input Features: Dataset <MyFeatureClass> does not exist or is not supported?

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 this error: Failed to execute. Parameters are not valid.  ERROR ...
0
votes
0answers
38 views

Aggregate / Calculate Cell Statistics >1000 Rasters

I'm looking for a tool/script that does simply what "Cell Statistics - Mean/Sum" in ArcGIS does but for more than 1000 Rasters (TIF) (I need to process ~10000 Raster at once). I'm not used to use ...
37
votes
10answers
11k views

What are some resources for learning ArcPy?

I would like to learn ArcPy, but I do not know quite where to begin. Does anyone have any good advice on where I should start to learn ArcPy?
2
votes
0answers
47 views

Creating python script to split selected lines at a set length

I have been having trouble trying to come up with a python script that will go through a polyline feature class representing a river system and split all the streams intersecting with a central river ...
1
vote
1answer
22 views

How do I batch input alias names from a table for a large dataset in ArcMap or ArcCatalog?

I would like to populate the alias names for the fields in the ACS 2014 5 year estimates file geodatabase (all 11439 of them). The ACS fgdb comes with the short_name and long_name in the metadata ...
3
votes
0answers
30 views

Creating arc segment between two points with common field using Python?

I need to create Arc Segments between multiple points with like data using half the distance between the two like points as the radius of the arc segment. I would prefer to use python to ...
0
votes
1answer
1k views

Debugging AttributeError: Object: Tool or environment <tool> not found in arcgisscripting?

I have a problem executing the code below in ArcGIS 9.3. The file is not found in split_row_0717.py Please kindly help any modification and thank you. The error said that Traceback (most recent ...
2
votes
1answer
60 views

Convert feature class names to lower case?

I'm simply trying to loop through the first immediate set of folders in a directory, then the GDB's, and finally the feature classes, however, now I get "ERROR 000840: The value is not a Data Element. ...
0
votes
1answer
72 views

Interpolating rasters into mosaic from point data using LayerTime object in ArcPy?

While trying to run the ArcGIS provided python script to interpolate a bunch of rasters on a time-enabled point feature class file I get the following error: Runtime error Traceback (most recent ...
1
vote
2answers
94 views

Set arcpy command line parameter same as Tool parameter

I have a python script that works correctly when used in a toolbox but not from the command line. How do I duplicate the toolbox magic that happens when specifying a parameter Data Type? There is ...
0
votes
2answers
54 views

SaveToLayerFile failed - “value is not a layer”

Tried doing a SaveToLayerFile on a layer in a workspace, but it confusingly says it's not a layer. I know it is a layer because the script can access lyr properties (e.g. name) and all of the ...
3
votes
1answer
94 views

How do I figure out the length of polyline features in a feature class with a WGS 1984 coordinate system?

I'm trying to figure out lengths of polyline features in a feature class with a WGS 1984 coordinate system. Here's code to list lengths: >>> import arcpy >>> inFc = ...
0
votes
0answers
45 views

Creating a point file with python from a pdf file

I have a 1500 pdf document that I need to extract latitude and longitude coordinates from. The Lat and long are formatted as one attribute so they need to be split plus there are a few other columns. ...
1
vote
1answer
258 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 ...
0
votes
0answers
25 views

Create individual feature classes for every record in a single feature class [duplicate]

I have arc desktop 10.3. I have a feature class (nycd) with 59 records in it. I'm trying to create a simple map with an inset that shows where each community district is located in that borough. I'd ...
2
votes
2answers
240 views

Python Script tools for ArcGIS 10.2 is very slow (get raster properties)

I am using python script tools for ArcGIS 10.2, under Windows 8.1 64bit. When I am using the arcpy.GetRasterProperties_management() command, it's very slow to process the data. For example. I tried ...
0
votes
0answers
5 views

What is the default mosaic_method value for MakeMosaicLayer_management?

What is the default mosaic_method for MakeMosaicLayer_management (see help here)? Usually, the docs say This is the default after the default value. And that is usually first option listed. Is the ...
0
votes
1answer
284 views

Debugging RuntimeError: Object: Error in executing tool from arcpy.RasterDomain_3d()?

I´m always getting an Error with my Python-Code. Even though it is almost the same as on the ArcGIS Help Website. The Error occurs in line 19: Traceback (most recent call last): File ...
4
votes
1answer
532 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 ...
1
vote
1answer
163 views

Publishing commercial ArcGIS Server Geoprocessing Services?

I've developed a set of ArcToolbox Python scripts, which I've been using on certain projects for clients. The approach we've been taking is to have our clients pay us to run these tools, and provide ...
1
vote
0answers
50 views

Speeding up ArcGIS arcpy.Merge_management for MANY files? [on hold]

I'm currently running a script that is using the arcpy.Merge_management function to merge roughly ~1500 shapefiles together. When I tried this with much smaller test runs, it ran perfectly. Now ...
3
votes
3answers
645 views

What causes RuntimeError: ERROR 010240 saving after CellStatistics?

I am having trouble saving outputs from CellStatistics but only when I run it on a list of rasters. This was working on python 26 but not 27. I know this example is nonsense, but: env.workspace = ...
0
votes
0answers
12 views

How do you use the setErrorMessage(message:string) within the ToolValidator Class?

The Programming ToolValidor Class ArcGIS Help menu states that: the following method: setErrorMessage(message:string) "Marks the parameter as having an error (a red X) with the supplied message. Tools ...
3
votes
1answer
27 views

Set up tool to only accept the name of a specific feature class?

I'd like the red x to show in the corner of the tool if they try to load the wrong feature class. That way we can prevent possible errors with the output. I've tried using the error messages arcpy ...
2
votes
0answers
40 views

Converting large rasters to NumPy

I have a geodatabase that contains a large number of raster datasets - there are two rasters for each country in the world, and they are very large, in some cases up to 3GB per raster dataset. I ...
2
votes
2answers
367 views

Why does “takes no arguments” error propagate from Arcpy example?

I was attempting to run Setup_Customers_Using_Tabular_Data , I modified the paths to fit my environment but when I run the program I receive SetupCustomersByTable() takes no arguments (6 given) ...
0
votes
1answer
25 views

arcpy.da.SearchCursor, cannot read preceding zeros from csv

I'm using arcpy.da.SearchCursor to read a csv that has a column with preceding zeros, e.g.: myCSVColumn 0124578 12598 04589 012568 ... When using the arcpy.da.SearchCursor it returns the value w/o ...
1
vote
0answers
88 views

Creating multipart polygons with ArcPy? Dissolve Failure?

I need the functionality of the editor > merge command for use in a python script tool. I realize this function is not directly accessible through ArcPy, but I am hoping someone can help with a work ...
1
vote
2answers
56 views

How do I generate an image of each polygon in a shape file? [on hold]

I have shapefiles containing areas (states, counties, bodies of water, etc.) and need to generate an image (png / jpg) of each area. How can I do this? In my mind, the manual workflow would be: ...
1
vote
2answers
261 views

Prompting “parameter window” during execution of ArcGIS Python script tool (or model)?

I am pretty new to ArcGis and ArcPy, so I apologize if my question seems straightforward. However, I have been looking on the web for quite a while and didn't find any answer so far. I am using ArcGIS ...