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

learn more… | top users | synonyms (1)

6
votes
1answer
60 views

Is the column order returned by arcpy.ListFields() always the same?

I'm using arcpy.ListFields() to get a list of fields in my Feature Class. Based on my limited testing of several geodatabases and tables, the order of fields returned is the field order specified in ...
0
votes
1answer
43 views

Select by location and copy to new shape and name based on attribute

I have a point features and polygon features. I need to: Select points that intersect the polygons Copy the points to a new shapefile Name this new point shapefile using an attribute of the polygon ...
0
votes
1answer
42 views

Finding Pseudo Nodes using ArcGIS for Desktop?

Trying to write a python scrip to find and dissolve pseudo nodes for a large dataset. Anyone have any code to perform such a task? For example, I have a road line with several end/start nodes ...
0
votes
1answer
66 views

Error in python code for loop using SearchCursor, selectlayerbyattribute, and copyfeatures tools

I am fairly new to python scripting for ArcGIS. I am trying to create maps where each county is selected and then copied into a new layer with only that county's data. Then, I used ApplySymbologyFrom ...
2
votes
1answer
100 views

How to check if an ArcGIS extension has already been checked out manually in arcpy?

I've written a python script that uses a Spatial Analyst function and hence requires the Spatial Analyst extension to be enabled. I would like to be able to check out the extension only if it hasn't ...
0
votes
0answers
11 views

Importing XML Schema, Update/Delete Field Names

Presently, I am trying to write a script to import a XML workspace that contains the outline of schema. I want to create a tool/script that allows the user to import it, specify the number of certain ...
0
votes
2answers
51 views

RuntimeError: Underlying DBMS error ORA-00936: missing expression schema.tableName STATE_ID is not column in table?

I created a search cursor to retrieve some data from a feature class. The broken example shown below is used successfully in other scripts I created. The only difference that comes to mind is I'm ...
2
votes
2answers
55 views

How to flip a polyline based on a separate polyline feature class being left or right to it

Can't go into detail about what these features actually are but I will just refer to them as the green line and the black line. The black lines are not able to ever overlap the blue polygons. Black ...
0
votes
1answer
41 views

GetParameterAsText(arcpy) does not work

I am new in this area. I was practicing the function GetParameterAsText(). I know that when you run the code (for example in PythonWin) it works like the function raw_input(), therefore it should ...
1
vote
1answer
101 views

Error: 'NoneType' object is not iterable (arcpy.ListRasters)

I am trying to extract a raster through a particular shapefile. import arcpy from arcpy import env from arcpy.sa import * arcpy.CheckOutExtension("Spatial") env.overwriteOutput = True ...
0
votes
1answer
62 views

How to create lines from points from different feature class ArcPy

I want to create lines based on two points: 1st line: point number 1 from pointFc, point number 1 from centFc 2nd line: point number 2 from pointFc, point number 2 from centFc and so on Where did I ...
2
votes
1answer
54 views

How to list items in a raster catalog?

I have a managed raster catalog in a file geodatabase that is comprised of 12 images. The screenshot shows the raster catalog footprint with the names of the tiff images that make up the raster ...
0
votes
1answer
39 views

Merge Feature Records with Identical Parameters in Two Different Fields using ArcPy or SQL [SOLVED]

I'm trying to merge feature records based on identical parameters in two different fields using Python or SQL. I have a polygon feature class with ~800 records, that I've intersected with another ...
0
votes
1answer
47 views

FeatureClassToFeatureClass_conversion taking too long

I wrote a python script in order to get all features near a point and its distances. To reach that, I'm using LocateFeaturesAlongRoutes_lr, then performing a join with a feature layer and finally ...
0
votes
1answer
30 views

Update Cursor not updating field correctly [closed]

I've got an issue with an update cursor not working correctly. The kicker is that when I dissolve by the field that isn't updating correctly, the output is actually correct. I have the same syntax on ...
1
vote
1answer
47 views

How to define NoData values in the ArcPy Clip raster tool?

I'm clipping some rasters with the ArcPy Clip tool (from the raster toolset) and a polygon feature and I'm having some problems with nodata values. The script I'm using is based on the code from ...
2
votes
1answer
84 views

Why does thumbnail on one MXD not update?"

I want to make modification on multi-mxd properties, I try Arcpy script with a loop like " for mxd in mxdList:" , but I always have same results, Thumbnails are not created... import arcpy,os ...
1
vote
2answers
81 views

Intersection point of polygon and the line created by two points ArcPy

I have polygon layer. I selected the most distant vertex from centroid (picture: point A). (How to do that is in the answer here: Select the most distant vertex from polygon's centroid using ...
2
votes
1answer
141 views

Recomendations about graphic interface for arcpy/python script

I have done some scripting using arcpy and python, and I want to make some interface to select some .shp. What are the best graphic tool for python to make this? I dont need high detailed graphics.
1
vote
2answers
191 views

arcpy.mapping.ListLayers() without calling current mxd document

my question is how can I use the arcpy.mapping.ListLayers() function without calling the current mxd? I'm hoping to run the python script without having an ArcMap document open. My setsymbology code ...
1
vote
0answers
33 views

Issues in projection while defining data frame extent by coordinates

I'm trying to set the following coordinates to a dataframe: custom_extent = {1:-87.678956, 2: -87.611652, 3:41.867129, 4:41.954932} where 1 is key for XMin, 2 is key for XMax, 3 is key for YMin, ...
1
vote
2answers
31 views

Creating Multiple Field Indexes Using Arcpy

I want to create a code that will take a feature class' fields and create indexes for each of them (because it is tedious to do it by hand). I'm trying to use arcpy.ListFields to get the fields and ...
0
votes
1answer
79 views

Pyscripter and arcpy not working together

I have installed pysripter on my machine and am not able to run any arcpy scripts from it despite being able to import arcpy. Models that work in model builder do not transition to pyscripter here is ...
0
votes
0answers
17 views

Exporting multiple map pages from list of apns

I use the code below to export two maps with different layers active for a single apn. The problem is I have a large list of APNs to go through so plugging in each apn at a time isn't really feasible. ...
1
vote
2answers
62 views

How to search by attribute using each row with Python?

I am trying to write a script to select each individual neighborhood using one FC, then use select by location to see the number of lots from another FC that are in the neighborhood and store that ...
2
votes
0answers
36 views

Updating Cursor to Include Newly Created Features

I am using ArcMap 10.1 and python to create cursor that starts at the one and only row of a polyline shapefile, some code runs to create a new feature based on the position of the exisiting feature, ...
0
votes
0answers
53 views

ArcGIS Execute error - Cannot Delete - May be locked

I have a problem deleting rasters from an outputfolder if I run the same script 2 times, because the code of my script is very long I tried to narrow down the possible problems by writing this little ...
2
votes
0answers
38 views

Invalid MXD Filename error in one script, but not the other

I have created 2 geometric trace models for a project, one to pick a spot on the network and run an isolation, and the other to choose from a list of buildings, then then run a trace to find features ...
1
vote
1answer
44 views

Field Calculator Python Issues [closed]

How can I adapt the following expression in the ArcGIS field calculator? Below is the python code: import arcpy fc = "2014_2" keyField = "ID_segment" affectedField = "KKN2" maxVal = 2500 cnt = 1 ...
0
votes
1answer
42 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
92 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
117 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
27 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
57 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
59 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
36 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
46 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
49 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
40 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
35 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
25 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
36 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
78 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
29 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
52 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
30 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
70 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
22 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
235 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 ...