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

learn more… | top users | synonyms (1)

1
vote
1answer
46 views

Definition Query then Zoom to Layer Automation?

I'm trying to create something in here. I want to have an automated process of doing a DEFINITION QUERY then ZOOM TO LAYER with one step. the concept is like that, a dialog comes up with one form ...
6
votes
5answers
168 views

How to access adjacent rows with cursor?

In the attached screenshot, the attributes contain two field of interest "a" and "b". I want to write a script to access the adjacent rows in order to make some calculations. To access a single row, ...
1
vote
0answers
29 views

Real-time Feature/Geometry Aggregation in Map Service Layer

Use-Case Provide a map service layer that perform a real-time aggregation of geometry objects grouped on a set of criteria from a normalized data source, labeling the resulting image based on data ...
2
votes
2answers
64 views

Call field from zip() into Field Calculator expression ArcGIS

I've been trying to find a way to call in field names from a zip(). Basically I have 12 fields called "Flw_days1", "Flw_days2" etc and corresponding "Depth" fields that need to be calculated using the ...
1
vote
1answer
43 views

how to separate a list of features from its shapefile_

I tried to copy all features in a list of dictionaries. the code looks as follows: def iterate_features(self): feature_set = arcpy.SearchCursor(self.address) for feature in feature_set: ...
1
vote
2answers
194 views

ArcPy setup and operation

I'm looking getting familiar with using ArcPy scripting within ArcMap to automate some common requirements (buffering, etc), however have some queries on how this is all set up. I'm running Arc 10.2 ...
1
vote
1answer
35 views

Select parcels from SDE layer using table list and exporting to shapefiles

Using a table of county fips codes and state name, I need to select from a large parcel layer stored in SDE and export to individual shapefiles based on the fips code and state name from the table. ...
0
votes
2answers
64 views

How to handle list variable in a where clause

I am calling a list of names in from a text file and would like to use each of those to make new layers. I am running into an issue where I get "TypeError: cannot concatenate 'str' and 'list' objects" ...
2
votes
1answer
77 views

How to turn on all fields before appending?

I'm using append on model builder, no test schema type. In order that field will match they need to be at the same order, and visble. How can I turn on all fields of input layer before appending ...
0
votes
1answer
34 views

Understanding arcpy.Describe IOError?

I am trying to find out if an mxd contains any schematic diagram layer through a python script tool. I am looping through all the mxds those are added to the python script tool and in each mxd ...
3
votes
1answer
119 views

How do I change to a Historical version using Python and arcpy

I am having an issue trying to change to a historical version on an SDE feature class using Python and arcpy.ChangeVersion_management. I am able to manually change the version to a specific date and ...
4
votes
2answers
121 views

Using Spatial References with ArcPy after *.prj files no longer installed by ArcGIS 10.1 for Desktop?

I'm writing a python script that uses the CreateFeatureclass_management tool, without a template. One of the required parameters is a spatial reference. I used to be able to point to the system *.prj ...
0
votes
1answer
38 views

Updatecursor returns with 'variable not defined'

I am fighting a bit with the cursor function since this morning. Thanks to the help of the people here and some tutorials I found I got this far import arcpy arcpy.env.workspace = ...
1
vote
1answer
41 views

SearchCursor returns strange value

my searchCursor look like this. arcpy.env.workspace = "C:\\Users\\Documents\\Scoring\\Ecodis_clip_split" #set workspace to folder with values eco = arcpy.SearchCursor ("NAME.shp", "", "", "area_ha", ...
0
votes
3answers
82 views

UpdateCursor 'is not defined' Python

I have several files (shapefiles). Table 1 has only one row with several fields whereas Table 2 has several rows. What I want is to take a value from Table 1 and populate all rows in Table 2. I used a ...
3
votes
1answer
49 views

How do I classify number values in Python to assign it to a group?

I have calculated the number of points that exists for a SqMi area and am trying now to assign it to a certain group based on where it falls in the classification. Does anyone know a tool that I can ...
2
votes
1answer
57 views

What are resources to learn ArcGIS for someone who already knew Python [closed]

I know that there are several resources recommendation questions, however, they are all from GIS people trying to learn Python (for example, here). My situation is the opposite: I have worked ...
0
votes
2answers
39 views

Arcpy: calculating a field based on feature class geometry, eg 'if FC ==“POINT” calculate xy coord

I have a script that populates new fields based on user input. I would like it to also add the XY coordinates in DD if the Feature Class is a point feature, else, it moves on to the next command. I ...
0
votes
1answer
36 views

Adding field to table without path to table (python) [closed]

I want to add a field to my table in the FieldCalculator. import arcpy arcpy.AddField_management("veg8", "test", "TEXT") An error message occured doing this and I figured out that I need to set a ...
1
vote
2answers
40 views

Arcpy text strings as gp expressions

I’m using a while statement to count down from x until it = y. Each loop decreases x by 1. This variable (among other variables) is passed into a geoprocessing tool’s expression variable as a ...
1
vote
1answer
64 views

Arcpy: List to point feature class

I have a list of lists that contains: [vala, valb, valc, vald, (pntx, pnty)] [vala, valb, valc, vald, (pntx, pnty)] [vala, valb, valc, vald, (pntx, pnty)] I also have a list of the field names that ...
2
votes
1answer
27 views

arcpy: join feature class (one to one) and get feature id of each joined object

I am currently spatial joining two feature classes like this arcpy.SpatialJoin_analysis(target_features,join_features,output_features, join_operation="JOIN_ONE_TO_ONE", ...
4
votes
1answer
80 views

Can ArcPy fill forms in Add-in interface?

I'm trying to build an ArcPy tool, which will ask the user to input some information (ID, Name, Address, Zip, etc.) first. My add-in interface is shown below, and hope to implement that once the user ...
1
vote
2answers
47 views

Set parameter of field from number to string with python

since I realised python is a very useful tool in ArcMap I dont want to do any workarounds anymore. I have a field with is numeric, but I want to perform this calculation in the field calculator on it ...
1
vote
2answers
93 views

How to copy selected features from one sde feature class to another with different attributes using Arcpy?

I am new to Arcpy scripting, I need help on copying the features to SDE feature class. My Scenario: We have 2 Geo databases running on Oracle 11g ArcSDE 10.2 . I have been asked to write the python ...
5
votes
1answer
194 views

Is there a way to use ArcPy module in the python shell that is not with ArcGIS?

I have ArcGIS 10.2 installed on my machine. When ArcGIS was installed, python 2.7.3(32 bits) was also installed. I need python 2.7.5 64bits for some gdal functions. So I installed python 2.7.5 64bits ...
1
vote
3answers
86 views

Merging many to one data rows in arcpy [duplicate]

The dataset 'left_right_merge' at the bottom of my screen shot shows the dataset that I'm currently working with. The NODE values indicate a single point feature, but is duplicated with many ...
0
votes
3answers
62 views

Script tool problems

I'm having trouble making a script tool in ArcGIS. I have developed a script that will edit certain values in the attribute table. Without incorporating a script tool this script works fine and edits ...
0
votes
2answers
40 views

Select and export by attribute iteration

I'm trying to do a loop for select and export layers by attribute and name them based on the field value. I've written the script below and it creates the shapefiles which picks up field values as ...
0
votes
1answer
82 views

How to programatically modify the placement properties for labels

Does anyone know how to modify the location of a label programatically? I'd like to make the labels sit directly below the symbol!
1
vote
1answer
92 views

Creating a Simple Join Script in Python

I'm trying to create a simple join script in python from an arcgis model, where the only steps are joining a map to a table to produce a map with the table's properties. The attributes joined ...
0
votes
1answer
37 views

excluding NaN records from FOR loop?

I am trying to create an array of Z and M values for vertices from a polyline (Z and M enabled) feature class. Some of the vertices do no have M values/geometry and I wish to exclude them from the ...
1
vote
1answer
85 views

Using UpdateCursor to update a field based on other field values

I've been trying to create a python script that will update certain fields in the arcgis attribute table. I have attempted to do this by using the update cursor to update a field based on another ...
1
vote
1answer
79 views

Is there a way to set the workspace on selected features

i´ve built in a tool for arccatalog which transfers GIS Files into shape Files. Everything is working so far, but i want it a bit more customer friendly. Atm it looks like this: You can right click ...
1
vote
1answer
35 views

How to use arcpy to ungroup a group layer in an mxd

I am looking for a way to ungroup a group layer using arcpy... (instead of having to open the mxd and right-click on the layer to choose "Ungroup"...) mxd = arcpy.mapping.MapDocument(pathToMyMxd) df ...
0
votes
1answer
53 views

Add points to shapefile and display over map interactively using Python Add-Ins

I want to add points to a shapefile interactively using pythonaddins and display them over map. Points are added to shapefile but not to display. Please suggest how to fix this discrepancy. class ...
0
votes
0answers
28 views

Using arcpy to enable layer masking (Advanced Drawing Options)

I am looking for a way to enable and change layer masking (under Advanced Drawing Options) with arcpy... it seems you can do this if you have the Production Mapping extension, but I do not have it... ...
0
votes
1answer
75 views

arcpy Make Feature Layer using a where clause

From a table of lines and polylines I am I'm building a seperate table of points (nodes) with their X and Y coordinates stored as attributes. I want the nodes to be unique, so I'm checking to see if a ...
0
votes
1answer
48 views

Change symbology of all layers in table of contents

I am attempting to put together a DEM of the U.S. I have thousands of contour elevation files that I have loaded into an ArcMap document. I need to change the symbology for all of the layers in order ...
0
votes
1answer
84 views

using Z and M feature geometry to create line graph in Python?

I am a Python (v2.6.5) noob trying to plot a series of 3D polylines into graphs. So far I've come up with: # Import system modules import arcpy, os, sys, string from arcpy import env ...
1
vote
2answers
54 views

Nodata issues in map algebra

A dummy question. I need to change all values in my rasters into ones. I've been able to do this fine in the Rater Calculator just by multiplying the layer by zero and adding one (my_layer*0+1), but ...
1
vote
0answers
51 views

Optimizing arcpy script to batch generate OD cost matrix in road networks

Following the question I asked in this thread, I wrote a python script designed to compute an OD cost matrix given a road network and origins/destinations locations. I am completely new to python, so ...
2
votes
1answer
45 views

Flagging when point feature(s) covered by tables (made as graphics) using ArcPy?

I've set up data driven pages to create a series of maps, but I'm running into a problem which seems like it would be quite common! I've made some tables (as graphics) using ArcPy and the technique ...
0
votes
1answer
44 views

Selecting raster data by location: for raster and feature class data

I have rasters covering certain spots in my environment, I'm looking for a way to extract the values which occur at locations which are defined by a selection of feature layers. I've tried with the ...
0
votes
1answer
55 views

Updating records based on value in another field using arcpy.da.UpdateCursor?

I am trying to write file names and paths to two separate fields in a feature class, and the value for each record is dependent on finding a match in a list. When I run my code it writes the same ...
3
votes
2answers
74 views

Efficient way to use a CSV to Define a Feature Class

I was provided an Excel Spreadsheet which had the definitions of fields for a feature class. There were several worksheets in the file, each containing field definitions for different feature ...
1
vote
0answers
75 views

Writing values to feature class in Python script results in strange characters"? [closed]

The script below does a series of things, and towards the end it is supposed to write values pulled from a list to a new field, if the feature class name is found anywhere in a list element. It does ...
2
votes
1answer
103 views

Merge from arcpy.ListTables() producing duplicate rows?

I was trying to manually merge file geodatabase tables and was getting Null values for the output file rows and decided to write a python script to merge the files. Here's my script: import arcpy ...
0
votes
0answers
29 views

How can I define coordinate system of feature class when overlaying with coordinate zone shapes in python?

I have generated bounding boxes for CAD drawings that do not have defined coordinate system files. I know that each drawing could be in one of 6 different systems that do not overlap. My idea was to ...
3
votes
1answer
82 views

Which feature class(es) is/are used by a service

I have several feature classes and a lot of services. When I try to make my feature class versioned I get the message that the feature class is locked which is obvious. But it's not telling me by ...