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

learn more… | top users | synonyms (1)

0
votes
1answer
39 views

Copying similar files from geodatabases into single geodatabase using ArcPy?

I'm trying to copy files form multiple geodatabses into a single database. I'm looking for two subclasses. Here's the code so far, it isolates the feature classes but when I try to run the search ...
2
votes
2answers
71 views

How do I transform values using a dictionary or lookup table?

I'm reading rows (~20 fields per row) from a database using a SearchCursor and placing them into an array. Then, I loop over the array and use an InsertCursor to insert them into a Feature Class in a ...
4
votes
3answers
113 views

Select the most distant vertex from polygon's centroid using ArcPy

I have a poligon and the polygon's centroid. I want to select the most distant vertex from centroid (picture: point A). I used arcpy.FeatureVerticesToPoints_management to create a feature class ...
0
votes
0answers
19 views

how to apply automatically current visualization option in NetCDF files using arcpy.mapping?

I am trying to create a time series animation automatically from NetCDF files, containing each file monthly data for the whole planet for periods of 10 years. I am writing a python script that reads ...
1
vote
0answers
56 views

Group contiguous polygons by sum of values [duplicate]

I have a polygon layer of watersheds (N = 1950) for South Africa. Within each watershed is a value (number of people; POPULATION field). I need to find a way to automatically group contiguous ...
1
vote
0answers
43 views

How to auto-increment attribute fields using cursors and conditional statements?

I am trying to create unique IDs for an attribute named "FACILITYID" (str) and have got a ton of help from related posts and online python tutorials. I selected the rows I wished to create unique ID's ...
1
vote
1answer
25 views

Specific Feature Copying

I'm trying to write a script to copy multiple feature classes from two different databases into a single database, but I want to be able to specity what features I actually want. I know I need to use ...
0
votes
1answer
33 views

How to handle text that needs to stay same for multiple maps but change according to attribute table

As with most things Esri, there's likely a few ways to approach my issue, so hoping someone has a good suggestion that doesn't require python or mystic incantations. I am currently on 10.0 but will ...
1
vote
3answers
42 views

How do I create points in a Feature Class from a database table?

I have a destination (Feature Class): C:/Users/XXX/Documents/ArcGIS/ABC.gdb/SamplePoints I have a database table in the same file geodatabase that contains my source point data. I have columns with ...
2
votes
1answer
43 views

Creating Branching Python Script, Based on Whether Feature Classes Exists or Not?

What I would like to do is create a script that checks the existence of a feature class and, depending whether it does or not does, skip to different process. This would need to be implemented in ...
1
vote
1answer
31 views

Getting version of connected database using ArcPy?

I wrote a toolbox script that allows a user to append points from a text file to a feature class. The user picks a text file and a feature class from a database he is connected to, the script then ...
1
vote
1answer
33 views

How can I show a label for a certain field in an attribute table for a shapefile?

names = ["Schools"] layers = arcpy.mapping.ListLayers(mxd, "*", df) for layer in layers: if layer.name == "Schools": layer.showLabels = True My code labels the default field in the attributes ...
1
vote
0answers
23 views

Saving fields after a raster join with python arcgis

I am working on a raster processing script in which i join a categorical raster with a table that includes some extra data on each category. After much hassle, I have the join working, but I can't ...
0
votes
1answer
31 views

Changing field values using arcpy

Say I want to make my field buff_dist longer than by 400ft, I want to write a code that will go through the table and change the field value by adding 400ft to it's value. How would I write that? I ...
3
votes
2answers
71 views

Adding descriptions to feature class in a geodatabase using arcpy

I am trying to populate the properties of a feature class in a geodatabase using arcpy. In the past I have been given geodatabases with features classes that already have their property descriptions ...
1
vote
1answer
28 views

Joining dBase (*.dbf) table to Coverage?

I have a dbf table and a polygon coverage. How do I join and save the joined data to the coverage without exporting to feature class and then re-creating a coverage in python? I have been looking at ...
0
votes
0answers
45 views

Arcpy script not working

I am very new to developing tool boxes using ArcPy on ArcGIS 10.2. I have written the code down to the execution stage but I am hooked up there. It is a basic code for band difference operation. ...
0
votes
1answer
26 views

How do SearchCursors sort records

How do arcpy searchcursors sort records if there is no 'sort_field' specified? It seems, on the surface, to sort ascending by the primary key. However, I don't want to base my script around this ...
0
votes
1answer
63 views

Export individual Mapbook pages to PDF

I would like to take a ArcMap mapbook and export each individual page to a PDF named for the page and/or GridID. I've never messed with Python... But I see that the arcpy.mapping module should do ...
0
votes
1answer
15 views

Specify the NoData pixel from 255 to a lower value pixel value

I have a series of raster files (tif) that extracted using a particular shapefile. However, the output files became much larger (from 2 MB to 200MB). The NoData is now equivalent to pixel value of 255 ...
2
votes
1answer
221 views

How is the Python IDE aware of arcpy?

I'm using PyCharm 4 for some Python scripting. When I type import arcpy I can immediately start using items within the arcpy namespace, like the environment & workspace objects. How does the ...
1
vote
2answers
63 views

Does arcpy.GetParameterAsText() have a data type?

import arcpy # Retrieve input parameters inX = arcpy.GetParameterAsText(0) inY = arcpy.GetParameterAsText(1) inDescription = arcpy.GetParameterAsText(2) incidentsFC = "C:/Data/Yakima/Incidents.shp" ...
0
votes
1answer
35 views

Script and model crashes after first iteration

I have a python script which dies after the first iteration. It dies on the second feature class to coverage. This also happened in modelbuilder, which is why I went to python hoping it would go away. ...
0
votes
0answers
19 views

Scripting Custom data setup functionality of Business Analyst using ArcPy?

Is it possible to script the "Custom Data Setup" functionality in the "Business Analyst" extension in ArcGIS using ArcPy? This functionality basically allows one to create a "Business Analyst ...
1
vote
1answer
20 views

Returning list of field names in joined table using ArcPy?

I need to look at all the fields in a joined table performed through arcpy. I am instigating for fields in arcpy.Listfields(Feature): print fields but it is returning a large list of: ...
1
vote
2answers
35 views

Getting number as parameter to use in SQL expression leads to ExecuteError: ERROR 000358?

In my script I am using the Select tool (arcpy.Select_analysis) and in the SQL expression, I want to use a number that I call in as a parameter. I have trying to script it like: subsize = ...
1
vote
1answer
25 views

Geoprocessing service fails if output paramter is empty

I have made a network isolation model that lets the user pick a point on the network to simulate a pipe 'failure'/section that needs to be isolated and finds all valves that need to be turned and ...
1
vote
1answer
20 views

Importing large number of shapefiles into feature class using ArcPy with column mapping?

I'd like to write an ArcPy script to import a large number of shapefiles into an EXISTING feature class. I also need to be able to perform column mappings as there may be different column names. I ...
0
votes
0answers
59 views

Create feature class/layer with data in python list

I want to programmatically add a layer to an MXD. The data for the layer is a list of tuples. From I what see, I need to create a feature class with this data (called invalidDataList) Below is what I ...
1
vote
1answer
44 views

ArcPy Table to Table Conversion Not Working Correctly

I have a script which writes the lat/lng of a json web service of bus routes. The script writes the latitude and longitude to a CSV correctly. However my table to table conversion does not work ...
2
votes
1answer
44 views

Error message trying to merge Shapefiles in Python

I try to merge all Shapefiles from one folder together into one, using this: shapeList = arcpy.ListFeatureClasses() print shapeList for fc in shapeList: if fc == "*domain*": ...
3
votes
2answers
130 views

Finding the Python script used by a custom toolbar button in ArcMap

I've been asked by somebody at work to design a toolbar add-in that works just the same as an existing one, but with a different set of data. However, the person who wrote the original add-in for him ...
-1
votes
0answers
46 views

Making tool in arcmap by using modelbuilder or python

I am trying to making one tool by using python. For that I already make GUI. In that i have 5 inputs. These 5 inputs are feature layers(shape files). Now I make another option field. It is multiple ...
2
votes
2answers
176 views

How to count point shp inside polygon shp using Python?

This is my first time here, so I'll try to be as specific as I can. What I'm trying to do is found out which polygon contains the most points and write the result in a text file. Here is my script : ...
1
vote
1answer
48 views

Issue with using arcpy.GetParameter and arcpy.GetParameterAsText to write layer source to text file

I am trying to get a Map Document and (a new) text file as user defined parameters, in order to write to the text file a list of layer sources. The text file is then suppose to open once complete. ...
1
vote
1answer
65 views

errors after installing 64 bit background geoprocessing on ArcGIS desktop 10.2.2

I installed 64 bit background geoprocessing on my ArcGIS 10.2.2 and then changed my pythonpath to "C:\Python27\ArcGISx6410.2" so that my code can benefit from the 64bit. then I had to install a 64b ...
1
vote
0answers
54 views

Eliminate in Arcpy

I am attempting to move away from Coverages. One of the tools we have did a great job of eliminating slivers from our datasets based on hard and soft boundaries for elimination rulesets; howver, it is ...
1
vote
0answers
47 views

Creating Automated Upload Script

I have a bit of a complex scenario that I'm unsure how to put together into one model or script file. What I'm doing is creating service definition files then uploading these SD files to a server. ...
3
votes
1answer
72 views

Using ArcPy to Remove Join?

I am trying to remove a join in arcpy and have been all over the forums and help topics but cannot get my script to remove the join. I have tried many combinations of inputs to the remove join but to ...
1
vote
1answer
39 views

Iterate Through Folders within Folders

I am having some trouble creating a model that will iterate through folders and subfolders. I want to be able to have the top level folder as a parameter and then have the code go through each of the ...
3
votes
1answer
43 views

Python output for batch “FeatureToRaster” in ArcPy

I am trying to batch process the conversion of shapefiles to rasters. I am stuck on how to specify the name for each output raster file. Part of the trick is that my input shapefiles are the names of ...
1
vote
1answer
67 views

problem with adding 64-bit background geoprocessing to ArcGIS 10.2.2

My code written in python language using Arcpy works perfectly with small to average size datasets; however, with a big dataset, the script stops in the middle of execution which most likely is due to ...
1
vote
2answers
76 views

Buffering continuously throws error “Background Server Threw an Exception” (Error 001143). Why?

I have written a code to create 1 meter buffers for features of converted feature classes (from rasters). I want to dissolve by the field "Class" so that I will have significantly smaller datasets to ...
1
vote
2answers
104 views

Insert.da.Cursor, Error - Sequence size must match size of row

So I'm working on this script which creates a table within a geodatabase. It then grabs the unique values from a list and attempts to insert them into the table using an Insert Cursor. I get the ...
1
vote
2answers
28 views

Words from ArcPy Scripts Appear in Map Document?

I created a slope map of the U.S. using ArcPy scripts (ArcGIS 10.2). I just completed the map. However, some of the words from my ArcPy scripts show up in the map document, both in data and layout ...
1
vote
1answer
67 views

Creating layers using definition query for each field in ArcPy?

I have a shapefile that contains a text field "Company" that i would like to use to run a definition query to create a layer file. I want to be able to create a layer for each company. I had a look ...
7
votes
5answers
271 views

Divide polygons into *n* number of groups of equal counts with ArcGIS 10.2

One of my tasks for work is to divide parcels into groups. These groups will be used by agents to talk to property owners. The goal is to make the agent's job easy by grouping parcels that are near ...
0
votes
0answers
21 views

Symbology templates mess up colors and legend labels when used in Python script

I'm having issues when trying to symbolize a layer from a .lyr template using a python script. The templates work when imported in ArcMap as seen below: But when run with the following Python ...
0
votes
1answer
11 views

Writing SOAP returned values to table in file geodatabase

I have this small script which takes the lat, lon of buses in Ottawa, I am using this as a basis for another script that I have to write, but since this one works I would like to use this in my test ...
2
votes
0answers
26 views

Create Map Tile Package (tpk) progress? arcpy.CreateMapTilePackage_management

I'm using arcpy.CreateMapTilePackage_management to happily create a .tpk - all good. Trouble is this can take a matter of hours, or days for a large complex mxd, once ...