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

learn more… | top users | synonyms (1)

1
vote
2answers
36 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
87 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
45 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
54 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
65 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
140 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
49 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
112 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
32 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
65 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
21 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
42 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
65 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
176 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
36 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
36 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
44 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
40 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
52 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 ...
0
votes
1answer
58 views

How to set feature coordinates to values in attribute table?

I have some shapefiles that were produced programatically, and everything came out okay EXCEPT that the geometry information was not written correctly. The coordinates for each feature are null. ...
0
votes
1answer
35 views

Trapping error messages with arcpy.getmessage issue

I am trying to capture an error with arcpy.getmessage(2) within a try/except statement but when it fails it tells me the issue is with the getmessage, it is not returning the error that occurred in ...
0
votes
0answers
38 views

Issue with da.updateCursor on shape

I recently posted answer Determining Y coordinate for Create Fishnet from desired Angle of Rotation in Python/ArcPy? . While working on it I found something weird with da.updateCursor on shape field. ...
1
vote
2answers
34 views

arcpy.Raster.save(*.jpg) - format unknown

The following Python script returns the error on the final line, "RuntimeError: ERROR 010093: Output raster format UNKNOWN is unsupported.": import arcpy inRaster = ...
0
votes
0answers
33 views

GetParameterAsText() with Cursor

I'm trying to use the GetParameterAsText() for user input. When I use a value instead, it works fine but not with GetParameterAsText() Any help will be greatly appreciated AreaFilter = ...
0
votes
0answers
29 views

Table To Table on Oracle table to File Geodatabase fails?

I recently upgraded to 10.2.2 and have found that some python scripts I used with table to table command no longer work. I am copying tables from an Oracle database to a file based geodatabase. ...
2
votes
0answers
86 views

Get Unique Field Values Within Python Script Tool

Using ArcGIS 10.2.2 and Python. I have a script that currently counts the number of points (representing crimes) in each zip code area, and writes that value to a new column in the FC that contains ...
1
vote
1answer
29 views

How to split polyline using points WITHOUT splitting at intersections?

I am trying to use points to split a shapefile of lines that have been dissolved.The "SplitLinesAtPoint" tool splits at intersections in addition to the points, WHICH I DO NOT WANT. I only want to ...
1
vote
2answers
43 views

Generate dynamic input with python script

I'm using 10.2.2 ArcGIS, I want to create a python script and have the following script: I'm new to this topic as I can use sys.argv [] or GetParameterAsText? for can I make dynamic input coordinates ...
0
votes
0answers
43 views

using arcgis server connection file(.ags) inside python is not running in linux

When i am trying to execute the following script from my desktop it's executing successfully, but same is not executing/not throwing error in linux ...
1
vote
2answers
43 views

Highlighting features selected by Python script in ArcMap and ArcGIS Viewer for Flex?

I have a database of orders, with geo data attached. I want the subset of features related to a specific order to be highlighted on screen (for starters in ArcMap, but later in Flex) in a python ...
0
votes
1answer
23 views

Data frame index

Can anyone know how to make index ,in arcpy, for a several data frame in one mxd? That question related to this question : Insert layer file to specific data frame
1
vote
3answers
68 views

Determining Y coordinate for Create Fishnet from desired Angle of Rotation in Python/ArcPy?

On the ESRI website it says: How_Create_Fishnet_works Calculating a value for the y-axis coordinate If you know the angle of rotation, you can compute a value for the Y-Axis Coordinate parameter as ...
2
votes
2answers
60 views

Distinguishing between table and FC using arcpy, when exporting from SDE

I'm working on a project where I'm pulling some data out of SDE and putting it into a file geodatabase for a group of people to look at with a custom map. I'm writing a script using the ...
1
vote
0answers
35 views

ArcGIS script for mapping lat/long coordinates to boxes/rectangles? [duplicate]

Working on a project that requires me to take lat/long coordinates and map them as rectanglular boxes on ArcMap 10.1. To be clear, the upper left & lower right corners of each box/rectangle are ...
2
votes
1answer
73 views

Use arcpy to check whether feature class geometry has ZM

I am looking for a programmatic way using arcpy to determine whether or not a feature class (FC) has Z and/or M geometry. It's easy enough to get the geometry type using the code below, but this just ...
1
vote
1answer
60 views

Unsupervised raster classification using GDAL

Is there an equivalent in GDAL to the Arcpy ISO data unsupervised classification tool, or a series of methods using GDAL/python that can accomplish this?
-1
votes
3answers
68 views

Insert layer file to specific data frame

I have a folder that contain mxd's projects. Each mxd has 3 and more data frame. I want to insert layer file to a specific data frame with position in the TOC. I don't know how to do it. I'm trying ...
2
votes
1answer
34 views

How to make Dynamic Legend in Map Book show “No information present at the time” using ArcPy?

I'm working on making everything automated in map book. One of the problems I have encountered was working with the dynamic legend. The issue is that when I toggle one page after another, some of ...
1
vote
1answer
32 views

Problem writing list of features to text file

I am attempting to write / run a simple script that list all the points within a directory, and the subdirectories contained within. Here is the code: import arcpy, os workspace = ...
1
vote
1answer
42 views

ArcPy Export SQL Server to Shapefile gives RuntimeError: Object: Error in executing tool?

I have executed a stored procedure and want to export this layer to a shapefile. I feel like this should be an easy solution. I tried using arcpy.CopyFeatures_management and it threw an error. I am ...
2
votes
1answer
37 views

Using checkbox on ModelBuilder tool to control adding to data frame?

I have a geodatabase feature class and every day I want to automate the loading of my feature class into a data frame of my map. At present in my model (below) I add into my data frame the ...
2
votes
0answers
49 views

Arcpy cannot connect to SDE on PostgreSQL with 32-bit version

So I've been banging my head against a wall for awhile with this one. I recently setup an SDE database in Postgres, and all seemed good. I am able to connect to it from both ArcMap and ArcCatalog, ...
1
vote
0answers
20 views

How do I make arcpy exclude frozen / off layers while importing a DWG file?

I'm attempting to update existing GIS feature classes (SDE) using master AutoCAD files but end up importing ALL features present in the AutoCAD drawing regardless of the visibility settings (frozen / ...
0
votes
1answer
40 views

Check In/Out of ArcEditor Licence

I'm having issues with some scripts that import an arc editor licence to run (similar to the example given on this page http://resources.arcgis.com/en/help/main/10.1/index.html#//002z0000000z000000), ...
0
votes
1answer
34 views

table update w/ cursor geometry conflict

I'm creating a table using arcpy with a list of results (stored in 2d lists) following an update to some features. This can sometimes include geometry, so I've attempted to substitute those for a ...
0
votes
1answer
40 views

add feature class by a Checkbox python

sorry for the changes but this is the overview of my problem I'm using 10.2.2 arcgis I have a geodatabase that every day enter new feature class I want to create a tool that lists all the feature ...
4
votes
1answer
70 views

Deleting geodatabases that are more than one week old?

I am using ArcGIS Desktop 10.0 and Python 2.6.6 and am trying to make an update script to copy the geodatabase to a backup folder with the date as part of the name, got that to work. Then export ...
0
votes
1answer
36 views

Add checkbox python tool

I'm using 10.2.2 arcgis I have the following script import arcpy mxd = arcpy.mapping.MapDocument ("CURRENT") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] addLayer = ...
2
votes
2answers
108 views

Select the most recent date from a table using Python/arcpy

Given a dataset with a date field, how would I select the row with the most recent date using Python or ArcPy?