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

learn more… | top users | synonyms (1)

0
votes
1answer
20 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
45 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
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 ...
0
votes
2answers
26 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
40 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
35 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 ...
1
vote
1answer
41 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
31 views

Problems using da.UpdateCursor in python Add_in to Edit Feature Class

I am currently attempting to create a Python Add_in tool which will perform a set of geoprocessing operations resulting in new values for a specific !shape.area!acres calculation on a new layer and ...
0
votes
0answers
28 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
20 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
44 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
19 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
86 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
19 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
50 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
97 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
51 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
26 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
35 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
23 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
41 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
40 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
50 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 ...
1
vote
1answer
21 views

How to delete all rows where a where clause is met with arcpy.da.UpdateCursor

I would like to use a where clause that finds a certain columns, and if empty then delete the row. My SQL where clause is; SELECT UID2 FROM MY311CONTAINERS_2 WHERE SR_SN_2 <> ' ' AND ...
1
vote
1answer
35 views

How do I add a text file to ArcMap using ArcPy?

I'm specifically referring to the output of the Compare Table (Data Management) tool, which is a comma delimited text file. When you add the text file manually, you can actually view it like any ...
1
vote
1answer
53 views

Do python codes need to be changed moving from ArcGIS 10.2 to 10.3 [closed]

What changes (if any) do I need to make to my python scripts to migrate from ArcGIS10.2 to ArcGIS 10.3
2
votes
0answers
28 views

Using ArcPy Python Add-In Interval Caller to do auto-refresh?

I am using this code set called pythonaddin_interval_caller (written by Jason Scheirer) to do some map refresh every several seconds. The code was designed for arcgis python-addin. The benefit of this ...
2
votes
1answer
68 views

Standalone Python script to split a polyline with a point layer

I have a polyline layer and a layer of points that are on top of the polylines. I do not have the ArcGis advanced license so I can't use the Split Line at Point tool. Can someone help me with a ...
0
votes
0answers
28 views

How do I update a column in a feature class?

I have a file geodatabase on my local computer. I want to update the value in one field of a feature class in that FGDB with the value found in an enterprise SDE. I know I can use a da.SearchCursor ...
0
votes
0answers
34 views

arcpy.da.UpdateCursor error: The required operation is invalid on a closed state

I have created an python toolbox to allow users to link a selected polygon to a image file. The user starts a versioned editing session, creates the polygon, browses to the image file and executes the ...
1
vote
1answer
43 views

How to search for a specific field and then use it in Field Calculator

I have a piece of code where the goal is to search through the field names within a feature, select any field based on a specific character (in this case "z") and then use that selected field within a ...
1
vote
0answers
31 views

Arcpy change highlight property of a layer or table field

I need to highlight a field of a layer. With ArcMap it is accessed from Fields property page of a layer. From there one can reorder, hide and highlight the fields. I couldn't find a property or ...
3
votes
2answers
81 views

Arcpy to get ArcGIS Application Data folder (My Toolboxes folder)

Is there a way (enviromental variable) in arcpy to get access to ArcGIS Desktop AppData Per User folder. For example I need to access this folder for arcgis 10.2: ...
1
vote
2answers
22 views

Problem using object as output path for arcpy.SaveToLayerFile_Management

I am simply trying to create a selection of a street layer from street names that appear within a separate .dbf of street names and create individual layers of each selection with a for loop. ...
3
votes
1answer
56 views

Stacking label boxes in ArcMap label expression

Is there a way to automate getting a seperate text box for two different field names in the label expression in Arcmap? Right now I have both fieldnames stacked in the same box. Without having to ...
2
votes
1answer
41 views

Changing Field Name/Apply Symbology from layer using ArcPy?

Using ArcMap 10.1, I want to use the Apply Symbology From Layer tool, however my field names are not the same. I'm having trouble understanding how to change the Field Names in a layer. I tried the ...
0
votes
1answer
42 views

Custom Script Tool Error - 000732

I am having a problem when impoting a script into a custom script tool. I am not the strogest person with python, but I have an existing scipt tool which was created by someone who does not work here ...
3
votes
0answers
39 views

arcpy, ExportToSVG using paths

I want to export part of the map into (very big) SVG file. First I tried to do this using REST API: https://*server*/ArcGIS/rest/services/General/Etages/MapServer/export. This worked, the SVG file ...
1
vote
0answers
20 views

surface area in a basin with reference to incremental height of DAM

I want to calculate "surface area in a basin with reference to incremental height of DAM" i tried this: step_size = 10 # metres; reduce this if you want finer resolution num_steps = 20 # increase ...
2
votes
1answer
34 views

script to draw a square where the raster pixels contained within are a certain type and greater than X

I have a raster containing different pixel values and I am interested in having squares drawn around areas that are at least X m^2 and containing at least Y type of pixels. The data looks like this, ...
1
vote
1answer
43 views

Auto-refreshing triggered by changes in directory for ArcPy?

I have a directory change monitor python script which monitors any changes happened in a directory, I want to trigger Arcmap auto refreshing whenever a change has been detected (eg. a new line added ...
1
vote
0answers
16 views

Bringing Alias properties with Feature Class to Feature Class Tool?

I am using arcpy.FeatureClassToFeatureClass_conversion(fc, outWorkspace, fc) to move many FC's to a new location. I have found that it is only bringing the FC Name property and imposing that on the ...
0
votes
1answer
17 views

Getting the majority value for a number of rasters in a conditional statement

I am trying to execute a conditional statement using Python and ArcGIS 10.1 that looks something like this: outRas = Con( MAJORITY (raster1, raster2, raster3, raster4) > 110, 1, 0) The idea is ...
1
vote
2answers
28 views

Trouble inputting interger values into an SQL statement within ArcGIS

So I am defining a function for use in a ArcGIS tool that will verify attributes, catch errors, and obtain user input to rectify those error. I want the tool to select and zoom to the segment that is ...
2
votes
1answer
29 views

Calculating slope for points with downhill slopes rendered as negatives in ArcGIS

I have a DEM and a series of points. I'd like to measure the change in slope along the series of points. Distinguishing between uphill and downhill slopes matter to me, and ArcGIS' slope function ...
2
votes
0answers
32 views

Adding text background color using ArcPy?

Is possible to add text background color using python on ArcGIS (ArcMap 10)? I wrote a function that able to change font color of the string but I want to add background color to it as well def ...
2
votes
1answer
74 views

Why is Python AddIn toolbar showing all “Missing” tools/buttons?

I am horribly new to coding with python. I made a toolbar using the wizard and old bits of VBA code. I created a button to search by map number, a tool to calculate area from UI and a second tool ...