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

learn more… | top users | synonyms (1)

0
votes
1answer
10 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 ...
0
votes
1answer
19 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 ...
1
vote
1answer
14 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 ...
0
votes
0answers
18 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
1answer
22 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 ...
0
votes
0answers
16 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
27 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 ...
0
votes
1answer
41 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 ...
1
vote
3answers
58 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
35 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 ...
0
votes
1answer
30 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
16 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
33 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. ...
2
votes
1answer
22 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
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
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 ...
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")) ...
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.
1
vote
1answer
24 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 ...
1
vote
2answers
28 views

How to remove newline from AddMessage() with ArcPy?

I am looking for a way to add text in the same line in the progress dialog box. The AddMessage() adds a newline and this is not convenient. For example: I want to have one line with the text: ...
2
votes
1answer
25 views

Calling Python script tool from ArcGIS model using relative path?

I am new to ArcGIS and facing a problem in calling a script tool from a model. I have the following file structure: E:\MyFolder MyToolbox.tbx ScriptTool Model Scripts myscript.py The ...
0
votes
1answer
58 views

Tool for generating Feature Class including field names/type

I am trying to build a tool that will generate a feature class and then populate the fields with the correct column name and format based off a CSV file. Has anyone had any luck doing this before? ...
1
vote
0answers
38 views

Switching between python versions for Arcpy [duplicate]

I’m developing a multi-module project in Python. I’m new to GIS and my boss doesn’t have a strong technical background. I’ve been instructed to use the Arcpy module to do functions such as intersect. ...
0
votes
2answers
63 views

Using Python to field calculate Lat/Long with decimal degrees rather than meters

The below is a snippet of a python script that I am writing that basically adds two fields - Latitude and Longitude, then calculates them. I could use the Add XY Tool which gets me to the same point. ...
0
votes
0answers
21 views

I need to link to or copy MS Access macros from a “master” database to MS Access personal geodatabase

Here's my situation: I'm a python and arcpy novice. I’ve been cannibalizing and modifying code from different sources into a work in progress. Development is in ArcGIS 10.1 and will need backwards ...
0
votes
1answer
18 views

How do you insert values into custom fields when adding to a Mosaic Dataset table?

I have a mosaic dataset (file geodatabase) with an additional field added to it (id that is integer) and I'm trying to accomplish in ArcPy what I can do manually--which is: Add a new raster (single ...
0
votes
0answers
40 views

Code converting lat/long coordinates (WKT) to polygon (shapefile) not working

I am having a problem converting WKT to shapefile. I have a csv file consisting of three columns: ID, Name (of the area) and WKT comprising set of lat/long coordinates of area boundaries. For example, ...
2
votes
0answers
31 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 ...
0
votes
2answers
25 views

arcpy MakeFeatureLayer - one workspace question, one output question

I'm trying to run a very simple python script to create a feature layer from a shapefile. The original script read as follows (I added the two print statements at the end to verify upon completion ...
1
vote
1answer
38 views

FeatureToPolygon (to cut polygons by line) not working correctly outside of ArcGIS

I asked a question yesterday, about splitting polygons using a line, and I ended up using the approach that is described in the comments here. Although this worked with my test data, it causes a lot ...
1
vote
0answers
34 views

How to align hundreds of rasters quickly

I'm hoping to accurately align hundreds of aerial images that are slightly off-kilter. The images cover the same area on different dates (several acres). They contain identifiable features around ...
0
votes
0answers
33 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 ...
0
votes
0answers
27 views

Aggregate / Calculate Cell Statistics >1000 Rasters

I'm looking for a tool/script that does simply what "Cell Statistics - Mean/Sum" in ArcGIS does but for more than 1000 Rasters (TIF) (I need to process ~10000 Raster at once). I'm not used to use ...
1
vote
2answers
19 views

Assertion Error with arcpy.mapping.UpdateLayer

I"m working with arcpy, where I'd like to write a script that examines the selection and if only 1 element is selected creates a buffer. I want to get the symbology from another layer, as the buffer ...
1
vote
1answer
43 views

Calculating a z value in python

I have some contours where the z value is stored in the geometry and I want to display it as an attribute. I want to include this in a python script. I have an expression which does this in python ...
0
votes
0answers
18 views

Failed to run Local Geoprocessing tool in ESRI runtime sdk

I have created a gpk using the below python script in ArcGIS 10.3.When trying to consume as Local geoprocessing service in 10.2.5,I get below errors. The application is running using developer ...
1
vote
1answer
63 views

AttributeError: 'module' object has no attribute 'TabletoNumPyArray'

I am trying to create a Python array using data from an ArcGIS attribute table. Here's the code I've written so far: import arcpy import numpy input = "c:/data/from/arcgis" arr = ...
0
votes
0answers
18 views

geoprocessing service errors 010429, 010302, 010067- works as script tool but not as gp service

I have a Python script that creates constant rasters based on user input. The script works when run as a script tool in ArcMap, so I can publish it as a geoprocessing service. But when I run it as a ...
2
votes
2answers
44 views

Critical facility pipe connections in python

I'm trying to find a way to determine pipeline connections located downstream a critical facility and score how far those connections are from the facility. Is there a way to accomplish the above ...
2
votes
1answer
94 views

Cutting polygon using line - cutter, cut() - using ArcPy?

What I'd like to do, using ArcPy: use a line to split a bunch of polygons into separate parts. Here is what the inputs could look like: In this case the line should split each polygon into two ...
1
vote
2answers
50 views

Arcmap grid index feature

I have used the Grid index feature tool to create an index grid. The label/attribution of the page names are populated in a "row" orientated manner. eg lef to right a1,a2,a3,a4,a5,a6 b1,b2,b3,b4,b5,b6 ...
0
votes
1answer
32 views

Using a list to access database from a layer

I am trying to access the database using a list in order to put it in a loop but I can't make it work. I want to replace the months with a list variable. This is the hard core example: ...
0
votes
1answer
53 views

Making Python Add-Ins for ArcMap after installing ArcGIS Pro prevents double-click running of makeaddin.py at Python 2.x?

I've been working quite a lot with Python Add-Ins over the past week or so in a Windows 7 SP1 configuration with ArcGIS 10.3.1 for Desktop and ArcGIS Pro 1.0.2 installed. I also installed Python ...
1
vote
1answer
35 views

Add Geometry attributes error

I have a point shapefile on which I would like to use the "Add geometry attributes: tool in order to add x and y coordinates using a GCS that I am interested it. When I run this tool I get the runtime ...
0
votes
1answer
21 views

How to extract,stack and calculate Standard Deviation from a NetCDF (.nc) to produce a single standard deviation and Mean image in arcGIS?

I have a NetCDF file for several years of monthly Climate data ( Precipitation,PET,Temp,etc) data from CRU 3.22 (Climate Research Unit). I want to extract a subset of the dataset namely 2000-2010. And ...
2
votes
2answers
33 views

Debugging Cursor object has no attribute _exit_ from ArcPy?

I am trying to replace NULL values for -999 in a table inside a gdb. I know how to replace the value for individual fields, but get an error when looping through the complete table. import arcpy fc ...
1
vote
0answers
22 views

Detecting broken hyperlinks using ArcPy? [closed]

I am trying to use ArcGIS 10.2.2 to detect broken hyperlinks from a .shp and export them to a text file. Is this possible to do this with Python scripting? I only want to see the broken hyperlinks ...
3
votes
2answers
37 views

Joining polygons to polylines based off specific point in polyline being within polygon

I am trying to join a polyline feature class and a polygon feature class. The polylines will always have at least their first point in a polygon, and each polyline consists of exactly three points. ...
0
votes
2answers
37 views

Reading Arcsde Data of a specific version in python

how can i read a version within python. for example lets say I set up a workspace which points to a .SDE file connection. Now how can I read the features from a version within python? I have looked ...
0
votes
4answers
47 views

Why is ArcPy script to apply symbology not working?

This is the first python script I have tried to write and I can't find out why it is not working. All I want to do is apply symbology from one layer to another. New Code(after comments): Error ...