A site-package created by Esri to expose GeoProcessing from ArcGIS to Python.

learn more… | top users | synonyms (7)

0
votes
2answers
506 views

Spatial ETL Tools won't run “AttributeError: 'module' object has no attribute, etc.”

I have a python script that runs 5 Spatial ETL tools that I wish to run as a scheduled task. Each of the tools will run successfully from ArcCatalog and also from the ArcCatalog Command line. If I ...
1
vote
3answers
191 views

Remove item from legend on a several mxd's

I used this code from this question here: Remove item from legend using ArcPy? However I keep getting an error at the following line: legend = ...
2
votes
1answer
30 views

Creating one layer through use of SQL queries for land use categories

I have a map with about 63 grids and trying to determine the land cover user category of the greatest area size in each grid. The land cover categories have been converted to polygons and I already ...
3
votes
2answers
71 views

Scripting is not following the order?

I have a script that has several lines and include 3 arcpy functions such as copy features, make xy layer event, and apply symbology. Right below those tools I am trying to use the arcpy.mapping to ...
0
votes
0answers
19 views

help in syntax arcpy.PointDistance_analysis

I can`t run this syntax in Python import arcpy arcpy.env.workspace = "C:\\Users\\aseel\\Desktop\\Project_pointDistanc\\PointDistance.gdb" in_features = "base" near_features = "dependent" ...
1
vote
0answers
18 views

Dynamically change labels/symbology to create multiple maps of the same dataset in ArcMap 10.1

I'm working in ArcMap 10.1. I have a data-set of multiple acreage fields that I am joining against a polygon shapefile. Let's say I have acreage fields X, Y & Z (in reality there about a dozen ...
0
votes
2answers
12 views

How to get Myriad Pro as font in ArcMap

I have an ArcPy script tool that exports a map with appropriate labels (10.1 SP1) and my coworker who made the original mxd that I'm basing it on is using Myriad Pro as the font for the text elements. ...
-3
votes
1answer
25 views

Getting nearest feature point from other features in point layer? [on hold]

How i can do this Get the nearest feature point from the other features point in a point layer Point feature class and make it in script tool
3
votes
1answer
82 views

Using erase tool in Python?

I am trying to create a python scrip to batch erase shapefiles. I have created a script that works, however, I know there is a better way and I just am not good enough at scripting to figure it out. ...
0
votes
0answers
13 views

Not able to apply update cursor on OS MasterMap feature classes created using OS Translator II

I am using OS Translator tool to convert OSMasterMap GZ files to PostgreSQL database. The feature classes created are query layers and cannot be edited in ArcGIS. Now I am writing a code to add new ...
4
votes
2answers
67 views

SQL MAX Subquery in arcpy.MakeFeatureLayer_management

I am having an issue with subsequent subqueries in making a feature layer in arcpy. My table has fields: OBJECTID, pointid (long), grid_code (double) I can successfully extract MAX(grid_code), ...
0
votes
0answers
32 views

Reverse Geocoding in ArcPy without creating new features?

I would like to reverse geocode an existing geodatabase of feature classes, but I don't want to create a new outputted feature class. I just want address attributes attached to my inputted features. ...
2
votes
0answers
34 views

Python script hanging forever in Pycharm with import arcpy?

I'm trying to get arcpy to work in Pycharm. I've done this successfully in the past. However, now when I try to do anything involving arcpy in Pycharm, the program runs then hangs forever. I have it ...
0
votes
1answer
12 views

Using IPython if set ArcGIS's python as default kernel in spyder?

i install anaconda first then set the arcgis python 2.7.8 win32 as interpreter just like Importing arcpy in Spyder said,but why i cannot open my IPython then?
2
votes
1answer
33 views

Arcpy make raster layer function does not produce right output

I am trying to extract bands within rasters: import arcpy arcpy.env.workspace = 'd:/Rstack' raster_list = arcpy.ListRasters("*RADIOMETRY.tif", "TIF") list1 = [] for i in raster_list: ...
1
vote
1answer
82 views

error trying to create two variables Cannot acquire a lock

I am trying to create two variables one for x vertices and another for y vertices, when I leave the vertices as x, y the code runs but not when I separate the vertices into verticeX & verticeY ...
1
vote
1answer
715 views

How to add Table View to Data Frame using ArcPy in ArcMap 10.0?

How does one add a table to the current map in ArcMap 10.0? 10.1 has the function arcpy.mapping.AddTableView, but this function does not exist in earlier versions. Must the table be made into a layer ...
2
votes
1answer
65 views

Implementing UpdateCursor?

I previously asked Updating attribute information about this script last week. I have amended it and am confused. I need to write the ADMINAREA value to the empty LOCALITY fields from TWB_Suburbs to ...
0
votes
1answer
47 views

Writing equivalent to ArcInfo Workstation DESCRIBE command using ArcPy? [on hold]

Is anyone aware of a Python script or tool that produces a report like the ArcInfo DESCRIBE command on any feature class? The old DESCRIBE command would create a report that described the ...
0
votes
1answer
40 views

Python Script to update all feature classes/datasets in gdb with search and update cursor?

I have two geodatabases, one is a production sde database, the other is a backup in a local file geodatabase. The script runs as a task once a month and is very resource intensive. I am using ArcGIS ...
2
votes
1answer
2k views

Fixing “spatial index grid size is invalid” without Recalculate button

I've got a python script that is connecting a squence of points to make lines, and putting them into a feature class (based on answers to my previous question). It works wonderfully on a small area ...
2
votes
0answers
16 views

How to create .sat files for .jpg tiles

I want to create map overlays for a TomTom GPS. Relief shading, ortophoto etc as map background while navigating in Map View mode. Instructions for creating custom overlay can be found here So far ...
1
vote
3answers
51 views

Using arcpy.SearchCursor SQL clause?

I got a table with the name Predios like this: OBJECTID PRM_IDENTIFICA 1 4030200606130 2 403020060615 3 40302006011700 Can I use search cursor to find the records ...
3
votes
1answer
46 views

How to use search cursor in a given extent

I want to perform a selective search cursor for a feature class for a given extent. I have tried setting env.extent in the below code but it is returning the whole feature class instead of a fixed ...
2
votes
1answer
292 views

ArcPy Data Driven Pages AttributeError: PageLayoutObject: Error in executing ExportToPDF

I am trying to export a series of datadriven pages. Executing on a single page fine no issue, executing on a few pages no issue. executing on many pages serious drama. Initially i thought it might be ...
1
vote
2answers
28 views

Calculate text field using python script and keeping preceding zeroes

I'm trying to calculate records in a text field to "01", keeping the preceding zero in tact using python script in ArcGis. I can do this easily using the field calculator in ArcMap or the calculate ...
0
votes
2answers
218 views

Can I use my SearchCursor in Select by Location

I am trying to select the largest polygon that contains each feature in a feature class but none of the features in another feature class. I have written the code that seems logical to me but (of ...
3
votes
2answers
43 views

Alternative to 'Editors Merge' feature using Arcpy

I'm looking for a work around that has had me in a pickle for sometime. It involves combining a multi-part feature polygon into a single feature. Obviously if you were editing a shape you would select ...
5
votes
5answers
17k views

Changing Symbology of Multiple Layers using ArcMap/ArcPy?

Is there a way to change symbology for multiple layers in ArcMap or ArcCatalog. I want to change the symbology of multiple layers at once.
1
vote
1answer
31 views

Is it possible to make an installer for a published tool, to install the tool to someone else's ArcGIS server?

I have a geoprocessing tool that works on my instance of ArcGIS for server. Is there a way to easily install this on someone else's Server, without having them run the tool and publish it through ...
0
votes
0answers
19 views

Prevent ModelBuilder Tools From Running if Published to ArcGIS Server

I'm looking for a way to prevent an ArcGIS ModelBuilder tool from running if it's been published to ArcGIS Server. Or, even better, for a way to prevent the tool from being published to Server in the ...
-1
votes
1answer
34 views

How to aggregate a list of raster in Composite Bands arcgis

I created a list of raster using ListRaster. However, composite band tool does not support list input. I want aggregate the list of raster into one raster, is there any other tool to do it in ...
15
votes
3answers
5k views

Quickest way to select ArcSDE polygon by point in ArcGIS Desktop using ArcPy?

I keep thinking that I must be missing something, but there does not seem to be a tool in ArcGIS 10 to select features (in particular polygons) from a layer at a point (X,Y) location via ArcPy. The ...
5
votes
2answers
1k views

Quickest way to Copy single selected polygon from large ArcSDE feature class?

I have selected a single polygon, which is large but not massively complex, from an ArcSDE 9.3 for Oracle feature class with 3.5 million polygons using ArcGIS Desktop 10.0 SP3. I would simply like ...
5
votes
2answers
296 views

Build Network Dataset with python comtypes

I know this isn't possible in arcpy, so I thought I'd give it a stab using comtypes. I am trying to translate some of the VB.NET code to create a network dataset from the help docs: ...
3
votes
0answers
46 views

Time Delay in Importing ArcPy

I've got a few on demand scripts via the web that run ArcGIS in the background via Arcpy. Now, every one of these scripts takes a solid 15-30 seconds to run, which I find okay. After doing some trial ...
1
vote
0answers
32 views

Arcpy ApplySymbologyFromLayer color problems with extent

I am batch automating PDF maps with many overlapping layers and many different symbology colors. When the map is zoomed far out- two of the layers, lets call it line1 (the only blue layer) and line2 ...
0
votes
1answer
16 views

Arcpy TabletoExcel input error

I have a very big dataset in a gbd. I would like to export it to an excel file. I use the following code: startingP = r"C:\Directory\ArcGIS\By_Coding.gdb\MyInput" endingP = ...
2
votes
1answer
588 views

Automatic calculation in one attribute table based on values in another attribute table using python

I am trying to fill the fields of one gdb table based on some statistics over the attributes of another shape file. As it was not possible in ARCgis directly, I am trying to use python coe for this ...
0
votes
0answers
13 views

arcpy.MakeFeatureLayer_management doesn't work [closed]

I make a script, I tried this a lot of time and this was working very well but, today don't work. I debugger but enter in merge but it doesn't exit. it is the code import arcpy, arcpy.sa print ...
0
votes
1answer
57 views

What data type is excel in Arcgis Add Script wizard?

When creating tool from a python script in ArcGIS, data type has to be chosen in Add Script wizard and one of my parameters is Excel and another one specific sheet whereas there can be more sheets in ...
1
vote
0answers
18 views

Creating a new field based on another field and proximity to another shapefile? [closed]

I have a shapefile (sf1) with speed and another shapefile (sf2) with road locations. I'm trying to create a new field in sf1 that denotes commuting, so a binary 0=not commuting;1=commuting. I created ...
1
vote
2answers
54 views

Python script to check if feature class exists in geodatabase if not convert feature class to feature class

I would like to check in one geodatabase and list the feature classes that are in it; check another geodatabsae for the list of feature classes, if they do not exist in the 2nd geodatabase then ...
1
vote
0answers
23 views

Can a map be added to a report generated through ExportReport using Python?

I am currently able to generate a PDF report using arcpy's ExportReport that contains attribute information for records within an attribute table, but is there a way to add a map to that report, as ...
4
votes
2answers
1k views

Select by attribute expression invalid in python

I'm not sure how my expression is failing. Any ideas? inPoints = "points.shp" i = 0 arcpy.MakeFeatureLayer_management(inPoints, "pts") arcpy.SelectLayerByAttribute_management("pts", "NEW_SELECTION", ...
0
votes
2answers
145 views

ArcGIS desktop won't import arcpy

I have arcgis 10.3 and I am trying to run a task using python but the python window within arcmap won't import arcpy. This never happened to me with 10.2.2. The error returned is: Runtime error ...
4
votes
1answer
67 views

How to get fieldnames in a value table depending on the input value

I would like to add a parameter as value table with one of the fields being a value list. The value table consist of 3 columns, namely "table","field","description", whereas "field" is a value list. ...
5
votes
3answers
3k views

Debugging RuntimeError: workspace already in transaction mode from arcpy.da.UpdateCursor and ArcSDE feature classes?

I am making my first attempt at editing an ArcSDE feature class with python through a da.UpdateCursor. I'm essentially taking code I've written for a file geodatabase feature class and applying it to ...
1
vote
1answer
41 views

How to add a script tool in a toolbox without the Add Script Wizard?

I have been put on a project where I need to modify and optimize an existing PythonToolbox and associated Toolbar (each button calls a script). I want to add a new script tool in there but the Add ...
3
votes
5answers
3k views

ExportToJPEG() arcpy script failure

I'm attempting to writing a python script that will automate exporting a set of stock maps to JPEG from their mxd files, and I'm having some strange issues getting there. I've alternatively been ...