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

learn more… | top users | synonyms (1)

0
votes
1answer
8 views

Loading data from shapefiles into specific feature classes

I am trying to bulk load a collection of shapefiles into empty feature classes in ArcMap 10.2. The issue here is that the names of the shapefiles and the feature classes need to match up. Is there ...
0
votes
1answer
18 views

copy only selected with CopyFeature_management

I am trying to test if each feature of a feature class list intersect each feature of a shapefile (clip layer). I'm working with arcpy in ArcGIS 10.0 The arcgis desktop help says that if the feature ...
2
votes
1answer
27 views

How to query values from a list in Python?

I have a list like this... list = ['1','2','3','4'] how can I use arcpy.Select_analysis to select features that have the attributes in the list. qry = '"SECDIVNO" IN ' + str(tuple(list)) ...
2
votes
4answers
59 views

Summarising all fields in attribute table using ArcPy? [on hold]

I was hoping to run a script that will iterate through all fields in an attribute table, SUM each field and produce the result in a table. The script below will essentially do what I want with one ...
0
votes
0answers
55 views

Exporting Folder of shapefiles to file geodatabase (GDB)?

Shapefiles Above mentioned is the link for the sample folder of shapefiles. I am working on exactly opposite of Export File Geodatabase to Folder of shapefiles I have a multiple folder of shapefiles ...
0
votes
0answers
26 views

Duplicate FID for points

I ran the script below to export feature vertices to points. The code works but after 10,000 points the same FID appears for 5 to 10 points. This continues for the rest of the dataset. There are ...
0
votes
0answers
44 views

How do I compare and replace data using python?

Here is my problem, I have several datasets that get updated fairly frequently. They are currently loaded in an enterprise GDB but the updates come in file system folders as shapefiles. What I ...
0
votes
0answers
22 views

Array to Feature Class and XYZ to Table Issues

I am trying export vertices of a line to a point feature class using the code below. I am using ArcGIS 10.2.2 and do not have access to Spatial, 3D, or Network analyst. I used ET GeoWizards to export ...
2
votes
1answer
34 views

ArcPy: check in and out of Advanced/Standard concurrent license

Is it possible to check in and out of a concurrent license straight from ArcPy. For example, sometimes I need to use a buffer right or find duplicates. Both tools require ArcPy advanced or Standard. ...
1
vote
1answer
78 views

Accessing geometry with SearchCursor in ArcPy

I'm trying to write a script that clips all feature classes in fcList by the successive rows of a clip feature. I'm using arcpy with ArcGIS 10.0 The problem is that I need to verify whether the ...
1
vote
0answers
16 views

Error changing version using ArcPy, produced from escape character in version name

I've got a script which creates a version from BASE, appends a feature to a dataset and then reconciles/posts. It runs successfully when I use a different SDE connection that doesn't have a backslash, ...
1
vote
0answers
23 views

Arcpy addin editable textbox on tool bar

I would like to add an editable toolbox on an arcpy addin toolbar. This would be used to change values of a threshold but I don't think this is currently available. (What I would really like is a ...
0
votes
0answers
16 views

multiple shapefile export to kml

I 'm new in Python script and i want to export shapefiles in the folder as the kml file with define layer files. for single shapefile it work perfectly refer below script. But I want to export 4 ...
1
vote
1answer
47 views

Where to break the loop to make several polyline instead of one?

I am trying to solve a problem, I am pasting part of the code: from arcpy import env arcpy.env.overwriteOutput = True spatialRef = arcpy.SpatialReference("WGS 1984") polylineFC = ...
-1
votes
0answers
38 views

Error creating polygons with ArcPy [on hold]

Based on the example from this page, running the code below results in an error message. Can someone take a look and tell me what I am doing wrong? import arcpy # A list of features and coordinate ...
0
votes
0answers
36 views

Legal description polygon mapping/creation with Arcpy

What I have: an excel file with the names of properties within an area that is part of the PLSS in which Township/Range, Section and Lot numbers are used. The file contains a legal description for ...
0
votes
1answer
46 views

Python Script to Identify and Flip Lines Digitized in the Wrong Direction

I have a river dataset that was digitized both in the direction of flow and opposite the direction of flow. I need to find an automated method to determine which lines were digitized from downstream ...
1
vote
1answer
20 views

Arcpy reclassify all values to same number

Using ArcGIS 10.1 and arcpy, is there a way to reclassify all values of a raster file to the same value (leaving NoData Values as "NoData")? Lets assume that I have no way of knowing what the actual ...
0
votes
0answers
16 views

Calling An ArcGIS Webmap's Scales

I am composing an Arcpy tool to help users cache their current mxd's webmaps (our own services). I want to know a way to call the ArcGIS Web Map's scales with ArcPy. Once I have the web maps scales, I ...
1
vote
1answer
16 views

Using ModelBuilder to replicate series of tasks without deleting output features first?

I am calling a number of files that I want to clip etc in ModelBuilder which clips data and sends it to a specific feature class. I want to re-run that same process for which I have converted the ...
1
vote
1answer
27 views

How to loop a Select by Attribute to use in a Select by Location?

I am new to python scripting and I need help. I am trying to select one row at a time on a shapefile that contains buffer rings around sites we are working on (some rings overlap), and for each site ...
0
votes
1answer
23 views

select a line with specific numeric field value using an inline variable for UpdateCursor

I'm currently away in a remote field station using Arc 10.0 and having a hard time using an inline variable substitution for a numeric field value. I am trying to use UpdateCursor to select only a ...
1
vote
1answer
60 views

region growing feature selection using arcpy

I have a polygon featureclass consisting of parcels touching boundary with each other and for which areas are computed in the attribute table (Figure a). I want to select polygons in an iterative way ...
0
votes
2answers
52 views

Select value from list in Python toolbox

within a Python toolbox in ArcGIS 10.2 I fill a parameter with a list. parameters[0].filter.list = myList It is essentialy a list of strings and will give the user a range of predefined years. Later I ...
0
votes
2answers
13 views

How to set values from list to row using arcpy

I have list with values and I want to put them in rows for specific column. Here is my code: den = kol() # list with values with arcpy.da.UpdateCursor('Wojewodztwa', 'gest_zal') as cursor: for ...
1
vote
0answers
20 views

How do I generate a drainage area-slope scatter plot from ASTER GDEM data

I have ASTER GDEM catchment data. I've installed the TauDEM tool. How do I generate a Drainage Area-Slope scatter plot?
0
votes
0answers
15 views

Issues Adding MapServerCache Raster Layers to Mxd

I have created a data consolidation tool. It consolidates a users mxd's vector and raster data into a project structure. It also allows the user to optionally cache our companies ArcGIS Server Web ...
-1
votes
1answer
30 views

Cannot see added layer in Table of contents arcgis

I am using a Python script to add a layer to my mxd. Following is the script: mxd = arcpy.mapping.MapDocument(r"C:\Amruta\clustereddata.mxd") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] print ...
0
votes
1answer
11 views

Assertion Error, Trying to add .tif to group layer

So I am trying to add a layer to a group, but running into problems most likely because of the file is a .tif. I have tried quite a few different iterations of this and looked at a few solutions but ...
1
vote
1answer
30 views

Python-Scripting in ArcGIS: Point as Input?

Is there any possibility to add a Point-Feature as an input parameter in a ArcPy-/ArcGIS-Python-script? If I choose "Point" as datatype in the parameter list, I get 2 input-fields for a X- and a ...
1
vote
2answers
23 views

How to best fit in certain scale 500,1000,2500,5000,10000 in Data Driven ArcGis

I have more than 2000 parcels. I added this layer in Data Driven. Need: One of the option that data driven has about scale of the Map is "Best fit". What it does its fits parcels inside data frame ...
1
vote
4answers
71 views

Apply Symbology to Rasters using Arcpy Script

I have an ArcPy script to apply the symbology of one raster layer to all of the raster layers in the table of contents. I have used this script before with feature layers instead of raster layers, and ...
0
votes
0answers
21 views

Python script to get count of features that meet a certain criteria [duplicate]

I am in search of a Python script for use in the ArcGIS Field Calculator to return the number of features that meet a certain criteria. Here's where I am getting stuck: def ...
0
votes
3answers
40 views

Empty shapefile after project tool in a for loop

I am running a for loop to process a years worth of data. The entire script runs fine for the first run through, but when it runs again (when date is 1/2/2013), I get the following error: 'NoneType ...
0
votes
1answer
48 views

Attribute Table Subtract Value From Previous Value

I have a river shapefile and need to ensure every vertice has a lower elevation that the previous uphill vertice. I have converted the polylineZ to points using ET GeoWizards. This gives me a Z ...
1
vote
1answer
56 views

How to determine nearest parcel neighbors, and adding direction info (N,S,E,W) in ArcPy?

I am working with a cadastral project, and I need a solution for a certain process, neighboring. Based on ArcGIS. Scenario: Have some parcels, every parcel has some neighbors. I would like to add ...
4
votes
3answers
118 views

Prevent newly created feature class being automatically added by ArcPy (Python AddIn) to Map Document?

I have a python addin, which as part of its function checks to see if a template point feature class exists on the user's machine. If it doesn't, it creates this file. This template file is used ...
1
vote
1answer
48 views

How to perform a calculation using attributes of groups of features in ArcGIS?

I have a table with information about 2000 aquifers (thickness, area, depth, volume etc.; there are 20 fields approximately). One of these fields is an internal code, i.e. DK_12_456_XXX; the last 3 ...
2
votes
2answers
79 views

Why is Clip_analysis giving ERROR 999999 using SHAPE@ geometry token as clip_features in arcpy.da.SearchCursor?

In my file geodatabase (C:\polygeo\test.gdb) I have two feature classes: PointsFC which has 400 points arranged in a 20x20 grid FishnetFC which has four polygons arranged in a 2x2 grid - this has a ...
0
votes
2answers
29 views

Randomly assign a value to a specificed number of rows in a feature class in ArcGIS

I have several feature classes, each with a million or so rows. In each of these feature classes I have an attribute ("STATE"), the value of which I want to randomly assign to one or another state (so ...
-1
votes
1answer
42 views

Cause of KeyError in Python Toolbox of ArcPy?

This question arises from Performing Point Distance analysis using Basic level license of ArcGIS for Desktop?. I basically copied and pasted PolyGeo's answer and formatted it into a python toolbox ...
0
votes
0answers
17 views

RasterToPolygon tool is looking inside the output location and not reading the fields

I am trying to convert IMG classified rasters to polygons. I created a code using the Raster to Polygon tool and it worked for 8 of the 50 files; for the rest, I get errors 010157 (Unable to open ...
2
votes
1answer
35 views

How do you override the required Create Fishnet parameters in ArcMap 10.1? [duplicate]

I'm writing a python script that creates a fishnet in a specified area (parcel shapefile) that accepts user input to create a polygon shapefile that represents a building, and polyline shapefile that ...
3
votes
1answer
43 views

arcpy release lock files

I have created a script that splits a shape file into multiple new shapefiles and adds them to an ArcMap document. When running the program a second time to overwrite those shape files lock-files are ...
5
votes
2answers
167 views

Arcpy: Names and distances of nearest intersecting roads in layer 1 to end points of a road segment from layer 2

As shown in the image below, I'd like to return a new field in layer 2 that for each segment stores a string:"Road C, 1 km from Road A to 0.5km From Road B". Calculation of the distances could be ...
0
votes
1answer
31 views

arcpy insert cursor problem - adding multiple polygons

I am reading rows from a database with a field "Coords" that contains polygon coordinates in the format 40.090170,-83.007704|40.089878,-83.007724..... and inserting each row as a polygon. The first ...
1
vote
1answer
25 views

findAndReplaceWorkspacePaths does not work for sde files so as to change datasouce (geodatabase)

I manage to change my datasouce by right clicking on an mxd file and choosing a different sde database connection file as shown in the following image. However When I try to do this using arcpy ...
2
votes
2answers
40 views

Is there a Python script to identify which database features are in Map/Feature Services?

I would like to identify feature classes that are present in my map services. Is there a way to automate this with python?
1
vote
0answers
31 views

How to edit a service definition file (SD) so as to change the Data source (User in oracle)

I am using Oracle 11g ArcGIS 10.2 Considering I have an enterprise geodatabase and I am connected as user1/mypass@myIP/xe I create a map from my table "mylocations" I choose share as ...
2
votes
0answers
43 views

What can I use to calculate drive times /with/ traffic considered?

I am looking to obtain drive times for a large list of addresses and want the results to take traffic conditions into consideration. For example, drive times from a distribution centre to a store at ...