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

learn more… | top users | synonyms (1)

0
votes
1answer
9 views

How to add separator in ArcGIS python add-in tool bar?

I am trying to separate two sets of button tools in a python add-in toolbar. I am trying to make a toolbar like existing arcmap toolbar where different classes of tools separated by "|". Can this be ...
1
vote
1answer
24 views

Updating a feature class based on evaluating different fields with arcpy.da.UpdateCursor

I have a feature class with a number of fields, two of wich are key fields, named key and front, and secondary fields named key_n and front_n. The thing is I need to search in the whole table for any ...
1
vote
1answer
36 views

Adding drop down option for layers in Python script tool?

I've code that will add fields to feature classes. I've parameterized the script so the user can navigate to the location of the feature classes to be edited. If the feature class is already open ...
0
votes
0answers
15 views

Batch processing Surface volume calculation in ArcMap?

I'm trying to collect the 2D area, 3D area and volume of a given basin at 0.5 meter increment in plane height, but since I want to graph the relationship between plane height and the areas and volume, ...
1
vote
1answer
24 views

Set NoData values to -999 in ArcGIS 10.3

I know how to set a value to NoData using SetNull, but how about the opposite? If I had cloud pixels in a Landsat scene that are currently set to NoData and I want to set them to -999 (an extreme ...
1
vote
1answer
52 views

How to create an ArcGIS toolbox programmatically?

Is it possible to programmatically create an ArcGIS toolbox? The aim is to write a plugin that works in ArcGIS and have a single source for the tool parameters which is then compiled to an Arc ...
1
vote
2answers
50 views

Search and Select in Arcpy with Cursors

I'm working on a tool that identifies features and repairs them using an existing tool. At the moment I am struggling to put my idea into code however. The purpose is to use a search cursor from a ...
0
votes
1answer
33 views

Update record based on series of conditionals using Python

I have a feature class which I've been using a relate to compare duplicate field values and was thinking of a way to eliminate the manual process of checking these duplicate values and making a ...
3
votes
1answer
41 views

What is the difference between data access's “SHAPE@XY” and “SHAPE@TRUECENTROID” tokens?

Data Access Search Cursor. What, if anything, is the difference between the tokens "SHAPE@XY" and "SHAPE@TRUECENTROID"? They returned the same coordnates on a test polygon: >>> cursor = ...
1
vote
3answers
41 views

Loop a Select by Attribute on all features (ArcPy)

I have a really basic script that selects an input Polygon by an Attribute and then does a series of Buffers on that, a select by location and then appends the result into a final output. I need to ...
1
vote
1answer
26 views

Add date field to imported csv file

I am using a script written by John to import a csv file and make a point feature class. My table looks like this: "timestamp_pretty","mmsi","imo","shipType","lat","long","month","week" "31/12/1969 ...
0
votes
0answers
18 views

How to use Mosaic Dataset Configuration Script (MDCS) and arcpy to add a spatial index

For a mosaic dataset ("demo1") created via Mosaic Dataset Configuration Script (MDCS) I also calculate the Boundary envelope (BB command). I would like to also calculate a spatial index for the ...
2
votes
1answer
59 views

UpdateCursor Not Working

I'm writing a short script that iterates over a list of feature classes and sets values for a specific field ("Contour_Type"), based on the values in two other fields ("Type" and "Depression"). It ...
1
vote
0answers
14 views

ArcPy script using 'symbology.addAllValues()' failing [on hold]

I'm having a problem trying to use symbology.addAllValues() on a layer with Unique Values Symbology. Unfortunately, I can't paste in actual code here since the machine I'm working on is classified, ...
0
votes
0answers
34 views

Is it possible to create a spatial view with arcpy?

We currently use an extension in ArcMap that was created in house to make a spatial view from two tables on an SDE server. The first table is a SDE Feature Class of all US postal zip codes (polygon). ...
2
votes
2answers
34 views

How to write log messages from arcpy to ArcGis server?

Published geoprocessing services write logs that are available at ArcGis Server Manager (arcgis-server/arcgis/manager/log.html) Arcpy has AddMessage, AddError, etc methods for logging, but they are ...
2
votes
2answers
49 views

Why does closing and re-opening ArcCatalog before running an ArcGIS modelbuilder model improve stability and can this be replicated in the model?

I am using ArcGIS 10.2.2 and ModelBuilder. I have a set of models that work and have been tested. I notice that if I run through the models one after another the open dialogue becomes very slow to ...
3
votes
1answer
52 views
+100

Downgrading WRF Hydro GIS Pre-Processing Tools 2.2 to work with ArcGIS Desktop 10.0?

I have just come across the WRF Hydro GIS Pre-Processing Tools for the first time. The version I am looking at is 2.2 and its documentation says: The processing workflow for creating WRF-Hydro ...
3
votes
0answers
36 views

Altering input files in a Python toolbox? [on hold]

I'm trying to add a temporary field to one of the input feature classes in my Python toolbox. arcpy.AddWarning("Adding field of type " + fieldType.upper() + " to FC " + varFC + " called " + ...
0
votes
1answer
32 views

ArcPy PrintMap is cutting off part of layout?

I am running a script that pulls certain .mxd files out of a folder and prints them for me. For some reason, when I use the script, part of the layout is cutoff; on the other hand, when I open each ...
-1
votes
1answer
38 views

JoinField General Function Failure[featureclasName] [on hold]

I am trying a simple joinfield in arcpy and i keep getting the error: Execute error: ERROR 999999: Error execution function General function failure [AA] failed to execute JoinField Below are ...
0
votes
1answer
26 views

How to automate ArcGIS share service with python

Right now i am sharing a map service in ArcGIS by following these steps. File --> Share as --> Service --> then click on overwrite an existing service --> select appropriate map --> Click on Analyse ...
1
vote
1answer
33 views

Copy GeoTIFF metadata to TIFF using ArcPy

I have conducted some image manipulation on GeoTIFFs in a program and the resulting TIFFs now have no spatial information attached. Their x,y origins are (0,0). Since these processed images are of ...
0
votes
1answer
30 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 ...
0
votes
1answer
28 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) ...
2
votes
1answer
31 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 ...
0
votes
0answers
29 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
2answers
105 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 ...
-1
votes
0answers
50 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 ...
1
vote
3answers
92 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 ...
0
votes
1answer
16 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 ...
3
votes
4answers
71 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 ...
1
vote
2answers
48 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
28 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 ...
1
vote
1answer
61 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, ...
2
votes
1answer
38 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. ...
1
vote
1answer
23 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 ...
0
votes
2answers
37 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 ...
2
votes
1answer
63 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
0answers
47 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. ...
3
votes
1answer
102 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
27 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 ...
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 ...
2
votes
0answers
51 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 ...
3
votes
1answer
75 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
13 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
0answers
35 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 ...
2
votes
0answers
44 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 ...
0
votes
1answer
29 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 ...
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 ...