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

learn more… | top users | synonyms (1)

0
votes
1answer
423 views

Vector boundary generation -similar to Image Boundary

I want to automate the creation of boundary polygons from vector files. This is not footprint or extent creation (I already have scripts to do this). I want to create a tool similar to the QGIS, Image ...
0
votes
1answer
220 views

ArcGIS Server GP Service - RasterIO.dll crashing ArcSOC.exe

I've been having a terrible time this week turning some very simple geoprocessing scripts into gp services on ArcGIS Server 10 SP 4. In the case of the linked post, I found that using certain raster ...
0
votes
1answer
486 views

Defining projection in arc toolbox (JSON to shapefile) in python

I have a arc toolbox which converts JSON txt file to a shapefile but we have to define the projection. How can I hard code the defined projection so that user don't have to input the projection ? ...
0
votes
1answer
632 views

Testing if shapefiles intersect from a list using intersect: ArcGIS

I am new to programming and scripting in general, so please bear with me. I have generated a list of the location of all the shapefiles for my workplace. The files are all placed in folders, no ...
0
votes
1answer
118 views

Issue with branching model

I am having an issue with a branching model when the iteration tool is used. The test code/scripts/models are in Google docs or arcgis forums It runs and creates both versions of the process whereas ...
0
votes
1answer
1k views

Create TIN from Elevation Points in Python

I want create a TIN from point features with elevation using a python script. This is my script: import arcpy from arcpy import env import json as simplejson import urllib import sys,os ...
0
votes
1answer
175 views

How do I assign a variable to a SQL Server ArcSDE database's feature class?

I'm using ArcGIS Desktop 10 and have no experience using Python with a SQL Server ArcSDE database. When using a shp file or file gdb it is very simple to reference a given feature class by simply ...
0
votes
1answer
60 views

Adding data at runtime into dataframes

I am trying to create an empty MXD to act as a template. I will have three dataframes for maps, each holding a different object from ArcSDE (1 raster object and 2 features). I know how to query all ...
0
votes
2answers
2k views

KeyboardInterrupt doesn't work when arcgisscripting module is loaded

The KeyboardInterrupt exception -- thrown when Ctrl-C, or Ctrl-Break on some machines, are pressed in a Python console window -- is commonly used to gracefully break out of long-process loops, ...
0
votes
0answers
2 views

getting error while deleting data from arcmap using pyhton script

error is : AttributeError: 'module' object has no attribute 'da' Code is below: import arcpy import os from arcpy import env Set local variables inWorkspace = "Q:\NHD project\Connection to ...
0
votes
0answers
27 views

Rename open MXD using ArcPy

Is there a method in ArcPy that will rename the MXD you currently have open? I don't what to use mxd.saveACopy("newFileName") as it will just save a COPY with a new name, not rename the current MXD. ...
0
votes
0answers
18 views

Catch Execute Error and Continue (arcpy)

I've got a script that does a number of Date/Time conversions using arcpy.ConvertTimeField_Management. A common issue that I need to handle is when the field is empty and an execute error is raised: ...
0
votes
1answer
29 views

Join in GUI not the same as arcpy join

I'm trying to join up some data so I can make some rasters. I am doing this in Python but when I create the join in Python in results in an empty attribute table for my shape file. The columns from ...
0
votes
0answers
26 views

Why Arcpy ExtractByMask returns a mysterious value “-128”

I'm getting an unexpected value of "-128" as a results of arcpy Extract by mask analysis. Input data is Esri GRID only containing values 0 or 1. Output format is .tif. For example, in this picture ...
0
votes
0answers
42 views

name 'row' is not defined error appears overnight

I'm using arcpy with arcgis 10.0. I strived days to write my first python script, and I finally get what I want until...a new error occured during the night. The script you can see below was tested ...
0
votes
1answer
12 views

Trouble with AddJoin_management? [duplicate]

While i'am trying to execute this code IN IDLE, i got error : import arcpy import math import arcview from arcpy import env arcpy.env.workspace = "D:/Users/saadiya/Documents/ArcGIS/Default.gdb" ...
0
votes
1answer
23 views

limit spatial extent of arcpy cursor

How do I limit spatial extent of features that is returned by arcpy.da.SearchCursor? Can I use arcpy.env.extent? Or somehow come up with sql statement to specify spatial relationship? Or do I have ...
0
votes
1answer
40 views

Feature Layer no longer accesible after MakeFeatureLayer_management

I am creating a new layer out of an old one with MakeFeatureLayer_management like this: arcpy.MakeFeatureLayer_management("layername", "newlayername", "DEPTH = 1200") This works for the first time ...
0
votes
0answers
37 views

Replace a feature class in a feature class list

I'm using arcpy with arcgis 10.0. I try a script that erase successively all the feature class of a list depending on a reliability field value. Each time a feature class is erased by an other one, I ...
0
votes
0answers
36 views

Using Modelbuilder or Python to write output a folder name using database or table file? [duplicate]

Has anyone worked on Modelbuilder or python to write to automate creating a folder using the database or table file to write output a folder name and or/create the subfolders? I recalled I had an aml ...
0
votes
0answers
15 views

Change Privileges tool does not work against feature dataset containing a network dataset

I'm trying to change the privileges on a feature dataset that contains a topology and network dataset using the ChangePrivileges geoprocessing tool. This works if I run the command manually from the ...
0
votes
0answers
24 views

How to get a polygon of the outline of a raster using arpcy

I have a large number of georeferenced raster datasets, for each dataset I need to create a polygon of the outline of the raster. I know this is possible using raster calculator in spatial analyst by ...
0
votes
1answer
37 views

Sort legend items up and down with arcpy

I work with arcmap 10.2.2 and I have 10 mxd's in one folder. I try to sort the legend items with a python code by moving the legend items up\down and i want that the layers in the TOC stay as is. I ...
0
votes
0answers
30 views

Moving legend items up and down with arcpy [duplicate]

How can I move a layer up/down in the legend using arcpy? I work with ArcMap 10.2.2
0
votes
1answer
87 views

Optimizing ArcPy code to cut polygon?

There is a lot of nested loops and wondering of ways I could speed up this code? Any ideas? Note: This requires ArcMap 10.2 def cut_geometry(to_cut, cutter): """ Cut a feature by a line, ...
0
votes
1answer
21 views

Using valueAsText, giving me unicode data instead of a list

I am learning Python to create toolbox right now. When I'm trying to get the parameter, using valueAsText, the date returned is unicode instead of a list that I was expecting. This is the code that I ...
0
votes
1answer
38 views

How to make connection

How to connect a argis, sde version through stand alone python script. SDE.Mapping is child version of SDE.Default and I want to make child version of SDE.Mapping . I am using direct sde services
0
votes
0answers
53 views

ArcGIS 10.1 - Error No spatial reference exists

I'm encountering a new error on some geoprocessing. It originally showed up while running commands in arcpy but now it crops up whenever I run some tools. I've been using the Extract by Mask on some ...
0
votes
0answers
67 views

Alternative way to find intersection between two polygon feature classes

I have been working on making a script to find intersection between two polygon ArcGIS feature classes. I can successfully do this in arcpy instances using spatial join or using search cursors on the ...
0
votes
0answers
31 views

python shell crashes on table to table conversion

I have two computers running the same code and on one (with better performace) it runs fine but the other crashes the python shell when executing the code below. I really don't understand why, any ...
0
votes
0answers
34 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 ...
0
votes
1answer
98 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
41 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
50 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
39 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 ...
0
votes
1answer
43 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 ...
0
votes
0answers
23 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 ...
0
votes
2answers
14 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 ...
0
votes
0answers
21 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 ...
0
votes
1answer
17 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 ...
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
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 ...
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 ...
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. ...
0
votes
0answers
32 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
28 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. ...
0
votes
0answers
42 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 ...
0
votes
1answer
38 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
32 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
58 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 ...