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

learn more… | top users | synonyms (1)

1
vote
0answers
13 views

Clip layout view to output graphics extent using python

I need to implement, within this very simple piece of code, the option that replicate the "Clip to output graphics extent" available from the ArcGIS 10.0 Export Map UI standard command. Is it ...
0
votes
1answer
25 views

insert rows not displayed in arcmap

I am selecting rows from one shape file and inserting to other by using below script executed from PythonWin. Both shape files have same structure. Records are properly inserted and able to see them ...
1
vote
1answer
4k views

Debugging ImportError: No module named arcpy?

I have written a script and am trying to run it in Python IDLE 2.7.6. I first try to import arcpy, but I get an error message saying "ImportError: No module named arcpy". Why doesn't it work? ...
3
votes
1answer
61 views

Union on lines using ArcPy?

Essentially I want to union multiple (20) congruent line shapefiles, where overlapping line segments in the input shapefiles are combined into a single resulting output shapefile. But I can't union ...
1
vote
1answer
145 views

Looping through Layers, Add Layer to MXD, Export Image, Repeat, using ArcPy?

ArcGIS 10.2.2 I am trying to loop through a list of layers in a folder, add each layer to an mxd and export an image of the added layer. I have added arcpy.mapping.RemoveLayer to the script to remove ...
2
votes
0answers
18 views

Spatial Analyst tools adding extra column of NoData

I've got a script tool in ArcGIS that runs Curvature and Aspect from Spatial Analyst, and the outputs of both contain an extra column. I've attempted to set the extent in the both the tool and the ...
1
vote
1answer
31 views

InsertCursor fails when trying to insert XY point data

I have a text file with X and Y coordinates, as well as a third piece of information. I'm trying to create a point feature class from this text file by use of an insert cursor. I'm working with ...
0
votes
1answer
18 views

Seeking ArcPy equivalents for SPLINE and SETWINDOW commands from ArcInfo Workstation?

I know of a list of conversions between AML and ArcPy. I was wondering if anyone knew of another resource to go between the two? In particular I am looking for a SETWINDOW (AML) function in ArcPy, ...
1
vote
0answers
17 views

Merging two or more selected features from same layer into one feature with ArcPy?

I need the functionality of the editor > merge command for use in a python script tool. I realize this function is not directly accessible through ArcPy, but I am hoping someone can help with a work ...
1
vote
0answers
18 views

Getting points from a particular section of point cloud data [on hold]

I have a las file and I'm trying to analyze it using ArcGIS/ArcPy. Are there any built-in functions that I can use (maybe using a tool or las data property) to isolate a chunk of points? I want to be ...
1
vote
2answers
35 views

How to check for empty values in fields of a featureclass?

(ArcGIS Desktop 10.0 Python 2.7) I need to check if any empty fields exist in featureclass fields in a gdb. These could be NONE, NULL "". The field name here is "Stand". The following code doesn´t ...
2
votes
1answer
22 views

Rename feature classes in file geodatabase in bulk

I see may versions of this post but none quite get me to where I need to be. I have 50,000 features classes in a file geodb. They are a1_xxxxx_xx I need to rename them all to a6_xxxxx_xxx This is ...
1
vote
2answers
40 views

Maximum distance to polygon edge

I have a point feature class and a polygon feature class, and each point is located within one polygon. Is there a way to programmatically calculate the distance from each point to the farthest ...
2
votes
1answer
1k views

How do I get statistics out of a table using Python in Arc 10?

I am very new to programming (I started learning this semester) and would very much appreciate helop with one piece of a project. I have the following table, and I need to write a script compatible ...
1
vote
1answer
40 views

Is there an arcpy tool to delete/unregister a replica geodatabase?

Seems odd but I can't find an arcpy or geoprocessing tool to delete/unregister replicas. When you create a replica it gets registered with the GDB that the data comes from. Afterwards you can't ...
1
vote
0answers
26 views

Ways to reduce buffer if it passes through a certain layer

I am trying to do WiFi analysis on signal strength in ArcGIS Desktop, and one of the big problems that I am running into is how to reduce the signal when it comes in contact with a wall, as it does in ...
3
votes
1answer
227 views

Exporting records from an attribute table and placing them in a txt file

I am trying desperately to grab records in a shapefile's attribute table and copy them, with additional formatting to a txt file. Below is the code I have developed thus far: I have used the ...
1
vote
1answer
28 views

What is the most efficient way to get the values of a previous row in a table using ArcPy? [duplicate]

I am very new to ArcGis and I would like to get a specific value of the previous row in a table. I found this question here on gis.stackexchange.com and experimented a little bit. However, I found ...
6
votes
5answers
283 views

How to access adjacent rows with cursor?

In the attached screenshot, the attributes contain two field of interest "a" and "b". I want to write a script to access the adjacent rows in order to make some calculations. To access a single row, ...
0
votes
1answer
31 views

How to add multiple fields to many Feature class using Arcpy

I have a geodatabase with multiple Feature Class (at least 100). I would like to add in each attribute table of each Feature Class, two new columns. I have to do that with a python script because it ...
0
votes
0answers
24 views

How to build a raster populated with an equation in a python toolbox?

I am working on creating a python toolbox to solve for WiFi signal properties based on various inputs, and for the end result I would like to have the output in the form of a raster. I need this ...
0
votes
0answers
18 views

Select polygon feature(s) in ArcMap and pass this selection into Python Addin

Does anyone has an Pyhton example to select polygon feature (or features) in ArcMap and pass this selection into a Python Addin? The selection made by mouse will be better.
0
votes
1answer
25 views

Adding field values from feature class into empty field of another feature class using append

I am attempting to add a feature class ("dis.shp") into an empty feature class("fc.shp") in a geodatabase using Python script. I have had success with the code below. However, I also would like to ...
2
votes
1answer
474 views

How to run OGR in ArcGIS Scripts?

When I run my script outside ArcGIS it works because during execution script uses a GDAL and OGR modules from osgeo. When I use script as a tool in ArcGIS it does not work. In PySripter I can import ...
0
votes
0answers
32 views

Using Eclipse/PyDev's debugger with ArcPy?

I have been using eclipse to help me write my scripts with arcpy and arcgis. I have been using add message in arcpy to help debug but that is very slow and doesn't always give me enough information. I ...
2
votes
1answer
34 views

How do I combine a wildcard command along with %s in a where clause statement?

I am trying to write a script where the user can search for a five digit zipcode using an input statement and a search cursor. The zipcodes in the file though are nine characters long (i.e. ...
5
votes
2answers
765 views

Python Script to convert a mass of KMLs to a single fGDB

I have a mass of KML files, approx 350+ that I need in a single fGDB. I lifted a string of code from ESRI help to attempt to do this - I got it working to the point of creating all the individual ...
0
votes
1answer
29 views

Convert multi KML and KMZ into shapefile using ArcPy?

I try to convert with arcpy (python 2.7.8) 50 KML and KMZ files, that i downloaded from google earth into shapefiles. All files located in many sub-Folders. All Sub Folders are located in one large ...
11
votes
2answers
4k views

How to read Excel sheet in ArcPy script?

I'm writing a python code to convert X,Y points in excel to shapefile. In this process i have toread xy points from shhet1. What is the step i have to include in my process to read data from sheet1 of ...
0
votes
1answer
46 views

Create FeatureDataSet in geodatabase with Arcpy from a table

I create an empty file geodatabase (gdb), and I would like to import in this gdb several feature dataset, at least 120 different dataset. I would like to import those dataset from a table like an ...
2
votes
4answers
646 views

What is causing syntax error in arcpy NetCDF Raster script

I'm trying to save the raster layer in the stand-alone python GUI but I keep getting a syntax error. I'm using the code from Save To Layer File (Data Management). And the error that shows up is: the ...
2
votes
1answer
192 views

Python Script tools for ArcGIS 10.2 is very slow (get raster properties)

I am using python script tools for ArcGIS 10.2, under Windows 8.1 64bit. When I am using the arcpy.GetRasterProperties_management() command, it's very slow to process the data. For example. I tried ...
1
vote
1answer
248 views

How to create sequential field based on sorted data? (or extract pop-up data?)

I downloaded a kmz field and converted it to a GDB fc on arcmap. However, the field I need to label the layer by is stored in the pop-up html field... It looks like this: <html ...
2
votes
0answers
32 views

Cul-de-sac (curve) turns generation in flow for parallel lines using ArcGIS for Desktop?

I'm using ArcMap 10.2 and I need to generate a parallel lines within the polygon and connect them one to other with the curve, with the proper radius and return radius (the same as cul-de-sac tool ...
3
votes
1answer
145 views

ArcPy script stops running randomly with no error returned

I am doing a batch watershed and analysis process on 135 points. This script worked great the first time I ran it. Ever since the first time, however, I have had the script stop at random moments. ...
1
vote
3answers
59 views

Python says my shapefile does not exist. Why?

I'm working on a script that prints the names of hospitals that are within a certain zip-code. When I run my code, though, python keeps giving me an Error message that says that my Hospitals shapefile ...
1
vote
1answer
37 views

MakeFeatureLayer throwing error 00840: The value is not a feature layer

I'm working through tutorials from the book "GIS Tutorial for Python Scripting," by David W. Allen, and I have this code pretty much exactly the way the book wants it (I altered one variable name from ...
3
votes
1answer
471 views

Converting string from GetParameterAsText to uppercase?

I am trying to make a tool in ArcToolbox using a Python script so users can input a street and lot number and it will zoom to the correct location/s in the cadastre. It's working but I have to type ...
2
votes
2answers
322 views

“ERROR 000840 | The value is not a Relationship Class”

I'm stumped here. I've seen this error in other posts but not quite in the same context. I'm trying to run the arcpy.management.CreateRelationshipClass() tool in ArcGIS 10.0. Absolutely everything ...
1
vote
1answer
729 views

Select By Atribute using python script on .Shp file getting error 000840 the value is not a raster layer

I have a script that calculating vertices angles on Polyline layer and the selecting features in that layer at a specified angle. at the end of the script i'm using select by attribute and getting ...
0
votes
0answers
39 views

What is the function for Joins and Relates?

I was writing a script to do a Join based on Spatial location. I don't want to do a spatial join as it will have all the fields of the layer that is joined to the target layer. I want only the fields ...
0
votes
1answer
31 views

Projection For Measuring Distances

Is it the case that when I use Arc GIS to compute nearest distance from a point to a poly-line/polygon, I need to project them both in an equidistant projection? Note: I am using the near tool. What ...
0
votes
0answers
19 views

Applying symbology to layers and exporting to JPEG using ArcPy? [on hold]

This is my first stab at Python/ArcPy! I have numerous point shapefiles that I am trying to apply a specific symbology to and create jpeg files of the same map for each symbolized shapefile. I am ...
2
votes
1answer
171 views

Reading environment variables in ArcPy?

I have a script that tries to read from the arc environment using import arcpy tolerance = arcpy.env.XYTolerance as recommended here: ...
2
votes
1answer
23 views

How to use Spatial Criteria with ArcPy Data Access Search Cursor?

The ArcGIS documentation for the Data Access Search Cursor states: The records returned by SearchCursor can be constrained to match attribute criteria or spatial criteria. But I can't see any ...
0
votes
1answer
26 views

map(arcpy.AddError, traceback.format_exc().split(“\n”))

What does this expression mean? I see this in many python scripts. try: ... except Exception as e: import traceback map(arcpy.AddError, traceback.format_exc().split("\n")) ...
1
vote
1answer
27 views

Python tools won't open when clicked on

I am creating a python toolbox within ArcGIS 10.3 and I am having issues opening it up in ArcMap. I have been editing it, saving it, and running it within ArcMap this whole time to test it little by ...
0
votes
1answer
17 views

Erase polygon from line to get line?

How can I erase a polygon from a line to get the erased line? Conceptual image below. Erase Tool does not work when mixing polygons and lines.
2
votes
1answer
141 views

ArcPy: check in and out of Advanced/Standard concurrent license

Is it possible to check in and out of a concurrent license straight from ArcPy. For example, sometimes I need to use a buffer right or find duplicates. Both tools require ArcPy advanced or Standard. ...
4
votes
1answer
517 views

mosaic raster to file geodatabase yields missing raster sections

Since upgrading to ArcGIS 10.1 (SP 1) from 10.0, I've been encountering an issue when running the arcpy.MosaicToNewRaster_management() tool with output to a file geodatabase. I'm principally working ...