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

learn more… | top users | synonyms (1)

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
37 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
96 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
51 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
148 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
28 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
67 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
45 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
30 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
35 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
38 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
44 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
33 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
57 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
84 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
29 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
48 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
87 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
25 views

ArcGIS Server throws an exception

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 error this error: Failed to execute. Parameters are not valid.  ...
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
40 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
142 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
41 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
61 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
26 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
59 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
175 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
93 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
54 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: ...
1
vote
1answer
124 views

Map automation to iterate through attribute table using ArcPy?

I have a python code which iterates through all attribute fields and creates a map for each field automatically. However, in the code I have to specify each attribute manually which was fine so far. ...
0
votes
2answers
91 views

Python Crashes when Running ArcPy's ExportToPDF(), ExportToPNG(), ExportToJPEG()

I am attempting to loop through a folder of ~400 .mxd's and save each to a .pdf in another folder. All tested arcpy.mapping export functions (pdf, jpeg & png) kill python without a chance to ...
1
vote
3answers
65 views

Script won't delete feature classes from file database using ArcPy?

I wrote a script that creates a GDB using a designated parish/county name and then does a selection by location and extracts from another db to the newly created db. This all works fine but there are ...
1
vote
1answer
61 views

Debugging/logging ArcPy / Python code behind ArcMap function?

Considering I Can use the right click --> set datasource at an mxd file to change the datasource. The following pictures describes how this can be done in arcmap.. How can I see the arcpy / python ...
4
votes
2answers
127 views

How to Parse Unique Address Data

I'm trying to parse some funky address data into separate fields either using ArcMap's Field Calculator or a Python Script. Currently, my address data including street number, street name, and ...
2
votes
3answers
141 views

Best way to delete many fields from many feature classes using arcpy?

I'm currently formatting our GIS data for use in a mobile app. The purpose of altering the data is to reduce the output file size that's imported into the app. I need to delete many fields from many ...
3
votes
4answers
115 views

Python Script create spreadsheet with exception

In the following Python Script, I would like to create a spreadsheet (Excel would be fine) with the Exception results instead of just printing "There was an error--->..." to be able to keep track of ...
0
votes
0answers
30 views

batch save MXDs to group layer files using ArcPy

Does anyone have / know of a script that converts all the MXD`s in a folder to individual group layer files ? It needs to use the MXD name as the group layer file name.
1
vote
0answers
40 views

Dynamic segmentation with respect to a control factor

Is there a way either with python scripts or other solution to dynamically segment a table with linear measures (from-to fields) Each segmented section (from-to) should have all the item numbers ...
1
vote
0answers
82 views

Compression Algorithms output files larger than the originals. Why?

I'm currently attempting to write a script that will compress a few hundred .tif files. I've tried two approaches, first I wrote a script in Python using CopyRaster_management() function and the ...
0
votes
0answers
18 views

ArcREST PublishCSVParameters error

I am consistently receiving this error when trying to publish a CSV as a hosted service. My only hunch is that the layerinfo variable is incorrect, however by the ArcGIS documentation I am passing ...
0
votes
0answers
13 views

How to track changes in feature class so as to update only the specific locations in cached service

I have a non versioned enterprise geodatabase. I need to know when a feature class changes, and which features have changed every time. I need this for updating only specific tiles in a cached map ...
3
votes
1answer
84 views

How to remove a specific unique value with arcpy

using arcpy, i would like to remove,from 50 mxd files, a specific unique value called "residence a" (exist in 3 layers) from the table of content. so i will get this result: The value of ...
0
votes
0answers
22 views

Switch selection in geoprocessing [duplicate]

I have to use Geoprocessing tools. my requirement is compare features in Source PGDB with Target PGDB in case target pgdb having extra captured feature list export as a shape file right now i am ...
1
vote
1answer
45 views

Export attributes of shapefiles into text file

I'm trying to export attributes of multiple shapefiles a text file. I am multiple getting errors when I run my code not sure what the issue is. Any direction as to where to start to fix this would be ...
2
votes
1answer
54 views

Setting Two Definition Queries as Parameters in Python Script tool causes: RuntimeError: LayerObject: Set attribute definitionQuery does not exist

I created a script that adds definition queries to every layer in an mxd depending on the layer name. This worked fine as a stand alone script, but when I try to use it as a script tool with ...
1
vote
1answer
137 views

Getting index of active data frame in ArcPy?

I am a little surprised to see that there seems to be no way to get the index of the active data frame in ArcPy, or did I miss something? For example, what if you want to add a tool’s output to the ...
0
votes
1answer
59 views

Deleting output shapefiles which have no data/features using ArcPy?

Still working on cleaning this up but it runs fine. Below is the rough code for a tool that iterates through field rows and clips accordingly to that row's shape. Everything outputs nicely but there ...
1
vote
2answers
64 views

Can you access all tools in python/arcpy regardless of license level?

Is it possible to write a python script using arcpy that is for a tool not included in the current desktop license level? For example, write something using the Identity Tool when you only have a ...
0
votes
1answer
63 views

Python Script to batch compress .tif files using LZW compression

I am currently trying to batch compress a folder of .tif files using LZW compression in order to free up storage space. I've been using this script in ArcMap's python window, adapted from here: # ...
2
votes
2answers
144 views

Trying to re-project a folder of shapefiles using Python Script

I am trying to reproject multiple shapefiles in a folder. When I run my program this is the error I am getting: line 8221, in Project raise e ExecuteError: Failed to execute. Parameters are not ...