Tagged Questions

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

learn more… | top users | synonyms (1)

0
votes
0answers
24 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
58 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
55 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
33 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
61 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
56 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
29 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
40 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
29 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
29 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
35 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
63 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
96 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
19 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
39 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 ...
1
vote
1answer
48 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
43 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
39 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
100 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 ...
2
votes
1answer
49 views

import arcgisscripting gives ImportError: DLL load failed: %1 is not a valid Win32 application

i am trying to import arcgisscripting and getting following error. Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import arcgisscripting ImportError: DLL ...
0
votes
0answers
21 views

How to generate histograms of multiple fields?

I have a large shapefile and I'm trying to automate a process to generate histograms of several fields with the MakeGraph tool, but I'm receiving the following error. class ...
2
votes
3answers
51 views

Insert layer file to MXDs with multiple data frames using ArcPy?

I have 4 mxd's and I want to insert layer file to each mxd with position in the TOC. Each mxd has 3 and more data frame. I don't know why it does't work. I'm trying this code: import arcpy,os,sys ...
2
votes
3answers
58 views

Remove layer file from MXDs with multiple data frames using ArcPy?

I have a bunch of mxd's and I want to remove layer file from them. Each mxd has 2 and more data frame. I don't know why it does not remove. I'm trying this code: import arcpy,os,sys,string import ...
1
vote
0answers
74 views

ArcMap “One or more layers failed to draw: An invalid SQL statement was used”

I created a model involving the tool Make XY Event Layer because I want to plot latitude and longitude points in CSV file columns. The model runs without errors and appears to have plotted the points ...
0
votes
0answers
39 views

Python script suddenly freezes and start to consume memory

I have a Python 2.7 script that generates multiple polygons around certain polygon (see picture). The meaning is determinate the effectivity of windbreaks. I don't know if my solution for this problem ...
3
votes
0answers
53 views

SetNull in Python script for Arcgis assign 0 value

I am writing a script in Python where I assign to few Tiff defined in a function as inputRaster a NoData value as follows: whereClauseSetNull = "VALUE > 100" outSetNull = SetNull(inputRaster, ...
1
vote
1answer
33 views

Change Data Source of Raster Layer Added to Map Display? Unexpected default

I have a script that I'm using to generate raster maps and automatically add them to the map display, but when they are added they are sourced to a temporary location. I use the same code for ...
2
votes
2answers
46 views

ArcGIS 10.2 : How to prompt a “parameter window” during the execution of a script tool (or model)

I am pretty new to ArcGis and ArcPy, so I apologize if my question seems straightforward. However, I have been looking on the web for quite a while and didn't find any answer so far. I am using ArcGis ...
1
vote
1answer
73 views

ArcPy SearchCursor getValue leads to NoneType object has no attribute lstrip?

I am having a little bit of a dilemma. I am having a problem with using getValue() and striping the value that is returned. For instance, take the following code. import arcpy as ap mxd = ...
1
vote
1answer
20 views

Trouble inserting name of feature in TOC into attribute table using arcpy.calculateField

I currently have about fifty rivers and creeks in a map, and none of the features contain the name of the waterbody. However, the features are named correctly in the table of contents Ideally, I ...
1
vote
0answers
36 views

set extent for jpeg programmatically

I feel like this should be easy, but how can I set coordinates for a jpeg image using Python? I have a python add-in that draws a polygon and then uses its geometry to post a query request to a REST ...
3
votes
0answers
53 views

arcpy.mapping.ExportToTIFF fails to render layer?

Has anyone else had this problem? I have an mxd file with two layers in it, one of which is fairly 'heavy' (i.e. takes a minute or so to draw). All layers are visible by default. I have the ...
4
votes
2answers
135 views

Why does arcpy.da.SearchCursor() class not autocomplete within Eclipse?

I am very new to GIS. I just installed eclipse luna with pydev plug-in and ArcGIS 10.1 for Desktop. When I write a script, trying to import arcpy.da.SearchCursor I see that no SearchCursor is ...
2
votes
1answer
97 views

How I can do event with two clicks using python add-in wizard?

How I can do event with two clicks using python add-in wizard, I have found a way to do event with one click by adding a New Tool in the wizard, but I need "first click To copy the attributes from ...
0
votes
1answer
18 views

Problem in adding raster layer from arcpy

I am using the following code to add the raster layer using arcpy in arcmap def AddRasterLayer(path,layerName): layer=os.path.join(path,'new'+str(layerName)+'.lyr') ...
1
vote
2answers
43 views

How to change field defined as REQUIRED to NON_REQUIRED in ArcGIS Geodatabase

I have created some feature classes in a geodatabase and also some fields using this sample code: arcpy.AddField_management("schools", "ref_ID", "LONG", 9, "", "", "refcode", "NULLABLE", "REQUIRED") ...
0
votes
1answer
43 views

Tools/Software for QA/QC of data

I currently have written a few custom scripts that run basic checks (null values, geocoding errors, fullness of metadata) using Arcpy(10.2 with almost all licenses) and gdal. I'm interested to know ...
2
votes
0answers
56 views

Using arcpy.da.editor on a transactional version raising errors

I've run up against a wall trying to get an edit session to work on a version. These are the scenarios Ive gone through in the code and their error mesages: Setting up an edit session not as a ...
3
votes
1answer
34 views

ArcPy Slope Script - Trouble Saving

I have an ArcPy script that applies the slope function to raster files in ArcGIS. I tried running the script with two raster files in the table of contents, and the script runs, but only saves one ...