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

learn more… | top users | synonyms (1)

0
votes
1answer
68 views

Batch merging field mapping

I made the following script to merge shape files of different format types (poly,line, points): def main(): import arcpy from arcpy import env import globalpath import os ...
2
votes
4answers
85 views

How to create new feature classes from rows in a polygon feature class

I'm trying really hard here to get an arcpy equivalent for ARCGIS' ModelBuilder's Iterate Feature Selection. I need to export the individual polygon rows in a feature class as new feature classes. ...
0
votes
1answer
77 views

AttributeError: __exit__ when trying to use arcpy.UpdateCursor

I'm trying to populate a field from values of an existing field in a feature class using arcpy.UpdateCursor. I'm getting this error: AttributeError: __exit__ Here's the chunk of code I'm ...
0
votes
0answers
47 views

Why do I get 0 with calculate field in my script?

My Script: #Define parameters input = sys.argv[1] major_axis = sys.argv[2] minor_axis = sys.argv[3] azimuth = sys.argv[4] #Add XY to point data arcpy.AddXY_management(input) #Add major axis, minor ...
1
vote
1answer
23 views

Multiply two lists of raster from two subfolder

I have two subfolders, which contains rasters for each country but which express different variables. I am trying to figure out a way to Loop a multiplication of each raster into a folder with its ...
0
votes
0answers
60 views

Error 000192 in Make VRP with Python scripting in ArcGIS 10.3

I've written a piece of python code in ArcGIS 10.3 for applying VRP. pretty similar to sample code in Esri resource website. But, it gives an error: ERROR 000192: Invalid value for Time Impedance I ...
2
votes
2answers
58 views

Reading next row of *.txt column inside ArcPy for loop for batch process?

I'm not sure how to approach this problem with python, but in plain english, I'd like to rename rasters with the names given in the *.txt file (see screenshot) and concatenate the basename given by ...
0
votes
2answers
94 views

How do I change the color and trasnparency of a layer using arcpy?

I would like to create an arcpy script to change the color and transparency of a collection of layers. The color and transparency would be based on wildcards such as "_dog" or "_chicken". The layer ...
0
votes
1answer
103 views

UnicodeDecodeError: 'utf8' codec- arcpy

I work with arcmap 10.3 and python 2.7.8. I have more than 500 shapefiles that located in many folders and subFolders. All Sub Folders are located in one large directory. I try with arcpy to detect ...
2
votes
1answer
95 views

Simple Folder to folder batch python script

I am writing script to take shape files from a folder to Buffer it to given distance to Output folder with same name as input files. Here are block of codes. # Name: Buffer_multiple file.py # Usage : ...
0
votes
1answer
142 views

Using Python function in ArcPy script?

I have an script to transform DN into Reflectance of each band of several images. The unique variable of the equation, apart of the Band itself, is the Divisor: (B1 - 1) / 508 (B2 - 1) / 254 (B3 - ...
0
votes
1answer
17 views

Auto adding map elements using ArcPy? [closed]

I am very new with Python scripting in ArcGIS Desktop. Just wondering if there is a way to auto add in map elements?
0
votes
1answer
36 views

Valid input for ArcPy raster to polygon in 10.1?

I'm experiencing some strange problems with this code starting from files with *.tif.tif to what seems should be *.tif.tif.shp according to the code. The code is not working because of the ...
-1
votes
1answer
47 views

Using arcpy.gp.Int_sa in ArcMap gives Error 000824: The tool is not licensed?

My Arcpy code is not working in ArcMap 10.1 because an error with the last line: Error 000824: The tool is not licensed. I have all my extensions turned on, so I don't know why I would be getting this ...
1
vote
1answer
117 views

Using Python script tool in ModelBuilder?

i have created the following tool to add two fields in a table and do a calculation in order to put the tool to ModelBuilder. For some reason when i am going to put it as an input in an another tool ...
0
votes
2answers
50 views

Geoprocessing tool default path access every one?

I am using Geoprocessing tools i have face one problem with default gdb access in my system (default gdb means C:\Documents and Settings\\My Documents\ArcGIS\Default.gdb ) how can access different ...
0
votes
1answer
60 views

Debugging AttributeError: 'Result' object has no attribute 'save' from ArcPy script?

I Keep getting this error message when i run the code below, can anyone tell me why? Error message: Traceback (most recent call last): File ...
1
vote
1answer
79 views

How apply error messages to a python toolbox that prevent my tool from running with bad parameters?

This is a continuation of my question here: Point and Polyline I tried making this question easier to follow. My tool accepts two main parameters - a continuous centerline and a table (or a feature ...
-1
votes
1answer
40 views

I want to reclassify a raster in one folder, rename it and put it in new folder using Python

I've been combing stack exchange and I cannot figure it out. I have a raster "slope_tif_18TXK030910", I want to reclassify it, rename it and put it into a new folder. this is what I have and it works ...
1
vote
0answers
25 views

ArcPy arcpy.gp.ExportMapServerCache invokes error: A secure connection with this site cannot be verified

What worked last week on many computers no longer works this week. My great ArcPy script gets a users current display extent and invokes gp.ExportMapServerCache to copy a web cache locally. It was ...
0
votes
0answers
71 views

UpdateLayer & ApplySymbologyFromLayer_management doesn't seem to be working

I have been trying to update the symbology of my raster layer file but nothing is happening. I don't get any error messages from using updateLayer or ApplySymbologyFromLayer. It also printed ...
0
votes
1answer
33 views

Populating an attribute inside a loop

New to python scripting. One of the issues I have been working on is trying to get a script to calculate the elevation gained in each stream section based on a single input and the knowledge of the ...
1
vote
1answer
40 views

Loop through multi-input list/selection?

I'm back with a script I've previously posted about that I'm constantly improving. Below is a working script that is connected to a database with 52 feature classes on a server that, when having user ...
0
votes
1answer
109 views

pythonaddins module

I've posted this question on GeoNet 4 days ago. At the moment I've received no answers and no comments so I thought I'd try here as well. https://geonet.esri.com/activity#nPLoc=/inbox I have a tool ...
0
votes
1answer
58 views

How to convert date field value returned by REST API to correct date? [closed]

I performed a query on this USGS feature service of Airport locations: Click for query And the value for the field LOADDATE is: LOADDATE: 1411380301000 However, when I pull the layer into ArcMap, ...
2
votes
1answer
161 views

Using Python to select random location from shapefile?

I have multiple shapefiles with bars names and location attributes and I want to create a script which asks the user for the area or shapefile name where they want to go and then prints a random ...
2
votes
1answer
31 views

Creating PolylineZ in arcpy

The script below is slightly modified "Polyline example" from ArcGIS help http://resources.arcgis.com/en/help/main/10.1/index.html#//018z00000008000000 import arcpy # next 3 lines are new from arcpy ...
0
votes
1answer
69 views

How to get arcpy to access attributes of a geometry?

As a novice python programmer I am struggling mightily with my code. What it is supposed to do is Buffer a bunch of points with four distances (100, 200, 300, 400meters) Calculate zonal sum for ...
0
votes
1answer
55 views

Batch reclassifying rasters in folder using ArcPy?

I am very new to python. I am using ArcGIS 10.0. I am trying to batch reclassify rasters in a folder and put the outputs into the same folder but with a new name(trying to do this using outputPrefix). ...
-1
votes
1answer
38 views

Load multiple layers into multiple maps - python

import arcpy import arcpy.mapping import os import sys from arcpy import env #import string env.workspace = r"G:\GIS" mxds = arcpy.ListFiles("*.mxd") lyrs = arcpy.ListFiles("*.lyr") for maps in ...
2
votes
0answers
47 views

Converting points using FeatureClassToNumPyArray to interpolate cross-section with scipy “interpolate” [closed]

I'm trying to plot elevation cross section and extract elevations along a cross section using scipy's "interpolate" function. I'm converting a point feature class of profile elevation points to 2 ...
-2
votes
1answer
42 views

Python Graduated Symbols [closed]

I am currently struggling with creating graduated symbols via Python. Based on ArcGISHelp 10.1 - GraduatedSymbolsSymbology (arcpy.mapping) I am doing as follows: import arcpy mxd = ...
0
votes
2answers
50 views

Simple text Field Calculation In Arcpy [duplicate]

the function is very simple: arcpy.CalculateField_management (fc, "DFDD", "aaa", "PYTHON") and I want to calculate DHDD field with simple text "aaa", but I get error: name 'aaa' is not defined. ...
0
votes
1answer
38 views

Stacked with “expected a raster or layer name” error

I am using the following python script snippet but I get a TypeError: expected a raster or layer name on the commented line below. I could not find a solution about how to convert the A1 raster (that ...
1
vote
2answers
65 views

Check shape orientation

I have a shapefile with many minimum bounding box (envelope) polygons and I need to find out, if the boxes are rather landscape or portrait format. (See pic below, one of the selected boxes should be ...
3
votes
1answer
97 views

Using arcpy to find geometry within another feature

In Arcpy, I would like to start with a point and then using its geometry method to find out if it is inside my polygon feature (Urban Areas) deeper than the buffer distance. This is a follow up to ...
0
votes
1answer
31 views

How to Print the Labels of a Unique Value Classification Using ArcPy? 10.2

I have a layer where I have symbolized the features on unique values. I have also grouped several features together. EX) Layer: Land Use; Value Field: Type of Land Use; Unique Values of different park ...
1
vote
1answer
57 views

arcpy.da.Editor undoOperation(): does it actually work

Ok, so I have looked over the ESRI documentation thoroughly and I'm still baffled by the arcpy data access module and the function undo operation. So far I have tried: workspace = pathtofile ...
3
votes
2answers
95 views

Accumulated value from many rasters python/arcgis10

I need to calculate an accumulated value of temperature (as an additional raster) from many rasters. Is there any option to do this in ArcGIS 10 or any hints for a python script?
0
votes
0answers
32 views

ArcGIS Server geoprocessing service throws ERROR 000732: Input Features: Dataset <MyFeatureClass> does not exist or is not supported?

I have a script in Python, that works well when I ran it in ArcMap. When I tried to execute it in ArcGIS Server as a service I got this error: Failed to execute. Parameters are not valid.  ERROR ...
0
votes
0answers
44 views

Cannot assign name to resultant terrain using ArcPy so cannot save result?

Question of python in ArcGIS: I can not assign a name to the resultant terrain, thus I can not save the result. I'm new to arcpy. By a piece of script using SetNull() in Raster Calculator, I want to ...
0
votes
1answer
46 views

Arcpy to append results of pivot table

Good Day All, So I have a script that does some processing but the main part are two things run a multiple ring buffer using arcpy.MultipleRingBuffer_analysis and four rings do some zonal ...
3
votes
2answers
164 views

Efficient ways to read table data from a large feature layer?

I have a feature layer that contains about 460,000 records and it currently takes about 20 minutes to read that table using the arcpy.da.TableToNumPyArray() tool. Is there a more efficient way to read ...
1
vote
1answer
46 views

NumPy Array to Feature Class: NameError from Inner Loop Variables

I have a NumPy Array to FC script that parses a JSON web-service. The outer loop writes to my FC correctly, however my inner loop variables come back as not defined when appending the items. The ...
1
vote
1answer
64 views

Output the Search Cursor as a string

I am trying to select Zones that intersect the dataframe (polygon). If there is only one return then I want to turn it into a sting. If there is multiple I want to turn it into a string with " ," ...
0
votes
0answers
30 views

Error 010240 when calculating mean of a list of rasters - Cell Statistics

I'm trying to calulate the mean value of a list of rasters but I am always getting the following error: RuntimeError: ERROR 010240: Could not save raster dataset to < value > with output format ...
1
vote
1answer
66 views

Why does Select Layer By Attribute give errors 000622 & 000628?

I try to select line segments from a layer "t_Pavement_Line which is open in TOC using the following line: arcpy.SelectLayerByAttribute_management("t_Pavement_Line", "NEW_SELECTION", ...
0
votes
3answers
245 views

Combo box in python add-in for Arc - keep selected value visible

This seems like a basic question that I cannot figure out. I have looked through other questions on gis.stackexchange and not found it, so forgive me if this is elsewhere. I have a python add-in for ...
1
vote
1answer
101 views

Python script to summarize layer properties

I recently found this layer properties script that summarizes layer properties in a single file or a directory and all subdirectories: ...
0
votes
1answer
62 views

address standardizer code in python for street featureclass

In my system I have featureclass Street and having fields. Featureclass : Street Input fields: NAME;STREET_PREFIX;STREET_NAME;STREET_TYPE;STREET_SUFFIX output fields: ...