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

learn more… | top users | synonyms (1)

1
vote
0answers
117 views

New python GIS Programmer : Fundamentals of the Python Language for ArcGIS [closed]

I am new to programming and I'm trying to learn "Fundamentals of the Python Language for ArcGIS" and then I've been trying to compile an example code but python GUI keeps throwing throwing this error ...
2
votes
0answers
64 views

Convert absolute file path to raster databaset [closed]

I wrote a simple python script that outputs an absolute path as string to a GeoTiff file. So this file can be treated as Raster. In a Model, the GeoTiff file is to be the input raster of a CopyRaster ...
0
votes
1answer
420 views

Problem adding a join to a table via Python using addJoin_management

I am currently building a script for a script tool that will join data from a multitude of tables into a single table based on a common join field. Now, I have attempted to use ...
3
votes
1answer
179 views

How to convert all shapefiles in folder into KML using ArcPy?

I was trying to convert all the shp in a folder into kml. featureclasses = arcpy.ListFeatureClasses() for fc in featureclasses: # Set Local Variables composite = 'COMPOSITE' pixels = ...
3
votes
1answer
166 views

Small script crashes Python

I'm running a rather simple script with ArcPy, which extracts values of raster to points of a shapefile: def raster_overlay(input_files): for raster in input_files: in_shp = ...
2
votes
0answers
107 views

Is it possible to run a search cursor on a multipart feature class?

I have a multipart feature class of cities. I want to run a search cursor on a cities feature class where: one city is selected and a select layer by location is run to select all parcels that are ...
2
votes
0answers
53 views

Copying an entire column between layers (tables)

I have a raster layer with probabilities as values and I process them using the Spatial Analyst extension. After the processing the values are modified, however I would like to also have the original ...
2
votes
3answers
218 views

How to release locks to temp files after ArcPy script crashes in ArcMap?

Sometimes when I'm testing an ArcPy script and it ends with exception, ArcMap is still holding locks to some temp files (I run my scripts through ArcMap). I cannot run the script any more, because it ...
2
votes
2answers
158 views

Trying to use Python code and user defined inline parameters to build a SQL expression

I am trying to build a tool where the end user can run a model and make a selection from a feature class based on 3 different fields, calculate the total shape length, & export the results to a ...
3
votes
1answer
114 views

How can I make my python script results appear in model builder

I have a model (model builder) and within I added a python script to calculate a field. My problem now is, that I don't know how to make the output appear in my model as it is the same as the input ...
0
votes
0answers
23 views

Possible to automate Buffer Wizard in ArcGis 10.x by working in the Shell? [duplicate]

I'm trying to automate the Buffer Wizard since I have several large sets of the data that I need to buffer at multiple distances. Doing it by hand will take a long time and be quite tedious, but I've ...
3
votes
2answers
191 views

Using ArcScripts

I use ArcGIS 10 I want to use an arcscript to compute an index of ruggedness for each cell of my map. For this purpose, I found, Evan's TRI.aml script here: ...
0
votes
0answers
67 views

Select By Attribute sql problems [duplicate]

Having trouble with this python code. I keep getting a ERROR 000358: Invalid expression" code for the select layer by attribute management statement towards the end of the code. Moved the data to ...
1
vote
0answers
77 views

Get values from select by location to append to table

I'm trying to calculate the road frontage of polygons by converting polygons to lines and splitting in their vertices, then using select by location to find lines that are within 7.5 meters of the ...
2
votes
1answer
48 views

arcgisscripting in CGI script

I'm trying to write a Python script that imports arcgisscripting (stuck on 9.3.1 here) which is then run as CGI by a web app. It runs fine from the Windows command line but as soon as I drop it into ...
1
vote
0answers
57 views

Convert polygon feature to line feature

I have a polygon shape-file i need to extract the line segments where the polygon features intersect each other and also the segment where they don't. Can we automate this process or can scripting ...
1
vote
1answer
295 views

Subquery a list in select layer by attribute management using python

I am new to python and having trouble with my script. I want only the records from the COMTRS field (of the pur_dbf_view) that match values from the ComtrsList to be selected; however, I am getting ...
1
vote
0answers
96 views

What is a good way to cluster point data by item counts in ArcGIS?

I have point features that have as an attribute an asset count. For instance, point A may have 3 assets whereas point B may have 300 assets. My goal is to have each point be in two categories: ...
2
votes
1answer
63 views

Is it possible to display two categorical symbolizes for two different attributes in one layer alongside each other in ArcMAP 10.1?

I have a road layer that I would like to display attribute_1 = "speed" on top of the line segment and attribute_2 = "traffic_volume" below the line segment. For each attribute I would like to setup ...
6
votes
1answer
98 views

Generate ArcGIS spatial bookmarks from feature envelope

Curious if anyone has some code that would rip through a feature class and generate a spatial bookmark for each feature's envelope. You could define a field in the feature to be the bookmark's name.
1
vote
3answers
197 views

Does arcpy.SearchCursor function support field indexing?

Does the arcpy.SearchCursor function support field indexing? In the sample script below, can I sent my cursor to loop through the values in the first field by setting an index to search the first ...
3
votes
1answer
91 views

Join is deleting fields in arcpy

I'm working on a script to automate the conversion of CAD .dwgs of rooms to feature classes, I'm nearing completion and am now working on the second portion of the script (I've seperated it into two ...
4
votes
1answer
257 views

Problem: Arcpy Graph function empty graph output

Background: I have some python code that I need help with parameter passing into the MakeGraph_management arcpy function. I would like to create a two-series vertical line graph for every pair of ...
1
vote
3answers
253 views

Is the FME Extension for ArcGIS required in order to use arcpy scripts in FME?

Is the FME Extension for ArcGIS required in order to use arcpy scripts in FME? I dont think it is but when i run a simple startup/shutdown script in FME I am getting these error messages. This ...
2
votes
2answers
92 views

'DEFeatureClass' vs. 'IFeatureClass'

I'm writing an ArcGIS 10.1 .pyt toolbox to accept a feature class as input (not a shapefile). Referencing ESRI's online guide to 'Geoprocessing Data Types of Parameters and Environments' [PDF ...
0
votes
0answers
130 views

Arcpy - change layer from sde connection to file geodatabase

We are copying data from our corporate office to field offices and we are creating a file geodatabase at these field offices. We are copying the layers that point to sde and they need to point to the ...
0
votes
1answer
63 views

Arcpy & ARCGIS10: Make netCDFRasterlayer, error attribute not found

I am trying to create a raster layer from a NetCDF File using Python. If I am using the Arcgis 10 Python window it works without issues. But executing the same script in Pythonxy gives the error: ...
5
votes
2answers
301 views

How to create an oriented buffer using arcpy?

I would like to create an oriented buffer for every polygon in my shapefile using arcpy. By oriented I mean that I have two angles a1 and a2 that constraint the direction of the buffer. This is ...
0
votes
0answers
63 views

zonal statistics from mosaic dataset

I'm trying to to do the following: def calcZonalStatistics(raster): # Set environment settings arcpy.env.workspace = r"C:\MyFileGDB.gdb" # Set local variables inZoneData = "Database ...
0
votes
1answer
79 views

ArcMap toolbox script with draw geometries parameter

I have an arcpy script in toolbox, that need one additional parameter to draw geometry(ies) which will work as a filter. I have done something similar using arcobjects using ...
1
vote
0answers
131 views

Change ArcGIS Server mapservice properties programmatically

I am weekly caching my ArcGIS Server mapservice tiles with help of a python script using the arcpy.ManageMapServerCacheTiles_server() command (ArcGIS 10.0, SP5). For whatever reason, this script fails ...
0
votes
1answer
259 views

nested SearchCursors to loop through two tables whilst adding rows and calculating fields

I'm trying to loop through each row in table "Sites_Copy" and look at "OID1" and "OID2". Then take these and loop through "BLPUs_PolygonNeighbors" and compare these to "src_OBJECTID" and ...
0
votes
0answers
91 views

Why would arcpy.Delete_management give ExecuteError: ERROR 000317: …dataset cannot be deleted?

arcpy.Delete_management(r'..dataset') returns ExecuteError: ERROR 000317: ...dataset cannot be deleted But it works in python interactive window... Anybody run into the same issue before?
1
vote
0answers
87 views

Use ArcPy to identify annotation reference scale?

I would like to retrieve the value of an annotation feature class reference scale using ArcPy (under ArcGIS 10.1). I cannot find where this property is stored (tried to access using the describe ...
2
votes
0answers
103 views

How to call ArcPy script from Windows Service? [closed]

I'd like to call arcpy script from Windows Service. Here (Calling arcpy/python from .NET?) I read that I can load python script. What do I need to load arcpy script?
3
votes
1answer
59 views

How to select among overlapping linear features by create date?

I have a table which has overlapping linear data; for example: A----------C and B---------C. Of these two records I would only like to return the record with the latest create date; in other ...
2
votes
2answers
394 views

arcpy.da.updatecursor to delete duplicate rows where values switch columns

I'm trying to dissolve polygons using polygon neighbors in arcgis 10.1, but don't want to use duplicate rows. However, the field values will switch when they're duplicated. If I run this: ...
2
votes
1answer
57 views

How to reference path to file that is in edit session from Python AddIn?

I am creating a Python addin button and I would like to reference the path to the layer that is currently in an edit session to the code in the addin button. This way users will be able to use the ...
0
votes
2answers
144 views

Arcpy Insert Cursor

The below code quits at the "cur = " line. Is it an error with arcpy module, my other scripts have worked with importing arcpy. I cannot determine if it is not recognizing the 'InsertCursor'. Any ...
0
votes
2answers
196 views

ArcGIS 10.1 - Using Polygon Neighbors with dissolved polygons

I've used polygon neighbors to find all neighbors of a polygon layer, which I then use to look up all possible neighbor combinations and dissolve the polygons into all possible combinations of two ...
0
votes
1answer
114 views

Cursor not working in ArcGIS 10.2

I just simply tried print arcpy.SearchCursor(...) A 'None' was printed. But arcpy.da.SearchCursor works. Has anyone run into the same issue, or is arcpy.SearchCursor deprecated in 10.2? Thanks
0
votes
0answers
94 views

Error in Select Numeric type column in pyodbc with ArcCatalog

I created a python script that uses "pyodbc" plugin to connect a SQL Server database and write out data. It was imported in an ArcGIS 10.1 tool and run from there. try: arcpy.AddMessage('FLAG 0') ...
0
votes
2answers
44 views

Updating a Field in the Current Selection [duplicate]

I have some address points selected for which that I want to update the address field based upon the row in the selection. How do I figure out the name of the selection taable to pass to ...
0
votes
1answer
88 views

How to get cell value from one raster within a raster catalog using ArcPy?

I need to be able to obtain the cell value of one cell in one specific raster that is stored withing a raster catalog in a file geodatabase. The Get Cell Value tool doesn't appear to be able to do ...
0
votes
1answer
108 views

Dissolve multiple rows straight into one layer and add OIDs into table

I am currently running this script to direct multiple dissolves of a polygon layer FC = "BLPUsCavPlace" TABLE = "BLPUsCavPlaceContigBLPUs" FIELDS = ["blpuid", "contigid"] with ...
2
votes
1answer
127 views

Best method to select features in one fc and project to different coordinate systems?

I've got data from all over Europe in one feature class projected in Web Mercator Auxiliary Sphere. Due to the fact, that length and area values are not usable I'm now working on a python script ...
1
vote
1answer
167 views

Migration from .gdb to .mdb - how to change automaticly all querys at MXD from “ ” to [ ]?

after migration from File Geodatabase (.gdb) to Personal Geodatabase (.mdb) - how to change automatically all field names at query definitions at the MXD from " " to [ ] What's else is important ...
1
vote
1answer
92 views

Need iterator help in create near feature script

I'm having two specific problems with this python script I'm developing. Background: I am trying to generate near_tables from fc's stored in fgdb, join the near table back to target feats, and save ...
0
votes
1answer
643 views

Use arcpy.da.searchcursor to select rows to dissolve

I'm quite new to ArcGIS and hope someone can help me. I have one table that lists which polygons are contiguous with each other called BLPUsCavPlaceContigBLPUs that looks like this: OBJECTID ...
0
votes
1answer
92 views

Code in python for arcgis to select multilines (path) and vertexes

I am learning to write a python code for ArcGis 10.2. Need help! I have some shp poly lines file, need to learn how to write multiple selection of those lines, even if a cursor of mouse pressed not ...