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

learn more… | top users | synonyms (1)

-1
votes
1answer
44 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
45 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
32 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 ...
0
votes
1answer
46 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
22 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 ...
-1
votes
0answers
31 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
25 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
30 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
24 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
64 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
24 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
36 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
28 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
32 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
18 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
59 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
56 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
votes
0answers
37 views

python script tool only works if layer is loaded in ArcMap

I'm hoping someone can help me understand this error. I have a python script that copies an ASCII raster to the scratch geodatabase. When I run the script, I get the error: However, if I load 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
63 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
58 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
56 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
30 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
29 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
33 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
33 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
42 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
16 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
30 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
30 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
36 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
64 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
32 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
97 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?
0
votes
1answer
20 views

Error in MultipleRingBuffer_analysis in python

I'm trying to use Value table in python to do a multiple ring buffer in ArcGIS 10.1 and I'm getting the following error: ExecuteError: Failed to execute. Parameters are not valid. ERROR 000735: ...
1
vote
0answers
20 views

XY coordinate data cleansing - search split and append not co mingling

My first question posted is for a project that stemmed from my current work where the data entered had some minor coordinate issues but to the extent of the data not being able to import more than 50% ...
0
votes
2answers
42 views

Understanding EOL while scanning string literal from Reclassify in ArcPy?

I'm trying to reclassify a raster using a Python script. I know I can just use the tool in ArcMap, but I want to start understanding the code behind it. Can anyone tell me why this doesn't work ...
0
votes
0answers
11 views

Is there a faster alternative to arcpy spatial join?

I am wondering if there is a more efficient method than using arcpy spatial join in python. I am currently using intersect and closest methods (including a near distance field) so would need ...
1
vote
1answer
49 views

why does arcpy function work in ArcMap python window but not from stand-alone script?

So I think I'm running into a data/schema lock issue, but I have no idea how to tell, or how to fix it for that matter. Here's the setup: I have this chain of gp functions: #extract elevations to ...
0
votes
1answer
46 views

Adding Maximum and Minimum Latitude and Longitude as features in ArcGIS for Desktop?

I have an Excel file with the coordinates (Latitude/Longitude) for an area. The file contains the coordinate of two corners in the latitude/longitude format. How can we do to use Python to iterate ...
0
votes
0answers
14 views

What's a python script to get count of attributes in feature class? [duplicate]

I would like to count the number of attributes in my feature class with python.
2
votes
1answer
40 views

How can I extract the data showed in Version Changes before reconcile/post process?

I want to make a script in python to extract the data about version changes before make the reconcile/post process. Is that possible? I trying to avoid use C# or VB script.
4
votes
2answers
101 views

Selecting points on one side of the road

I am a newby in python scripting in GIS. I have 2 shapefile: first one with roads and second one with points that contains address number and street name. I want to select these points from right ...