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

learn more… | top users | synonyms (1)

1
vote
2answers
60 views

Spatial Join - One Join Feature to Multiple Target Features

I want to join a set of target features (polygons) to a set of join features (points). The polygons can, and do, overlap. I want the join features to be counted (joined) to as many target features ...
1
vote
0answers
41 views

Portal for ArcGIS WMTS layers are optimised & un-cacheable

When a WMTS in Portal for ArcGIS 10.3.1 is opened (via Portal) in an mxd, the WMTS layer properties are not standard. The; Source, Layers, and Advanced tabs are missing. When the portal WMTS layer ...
1
vote
2answers
61 views

Access individual bands and use them in map algebra

I have a list of multiband rasters, consisting of: Red=Band 1, NIR=Band 2, SWIR1=Band 3 and SWIR2= Band 4. What I want is to access only the red and NIR bands and save it to new file. Then, I'll be ...
1
vote
1answer
68 views

Reference Selection in SQL query (where clause)

I keep raising errors with my where_clause in the 9th line of this script. FID is an Object ID field and I want the cursor to select whatever row it is currently pointing at. I don't know how to do ...
1
vote
1answer
57 views

CalculateField with variables

I'm trying to make a python script on arcmap 10.2.2 which will copy values from an old field (selected by the user) and paste them in an new field (named by the user). I wrote that: fc = ...
1
vote
2answers
49 views

Error when creating data with special characters and numbers [duplicate]

My code will not project and store the feature layer in the scratch.gdb. "ERROR 999999 ... The table name is invalid. The table was not found. [17_5330_51961Lake]" The interpreter doesn't like "-" ...
0
votes
2answers
25 views

Easy Data Source Removal

I am trying to remove anything in a map that has "DI" in the source path. I have a test mxd with one df and 2 lyr's. The lyr data sources are: ...
1
vote
1answer
39 views

Does arcpy have any tools for transforming field values in a fieldmapping?

I built my fieldmappings and, for the most part, everything is working. I recall reading somewhere that I could also use fieldmappings to transform field values during the import process. ...
0
votes
1answer
35 views

ArcGIS GP Tool as sd file with multiple scripts

Is it possible to add multiple script files containing other python classes, config etc, and even .sde connection files when publishing service definition from arcmap? I do not have access to the ...
0
votes
1answer
35 views

Custom Script Tool - Raster Index

I am still somewhat raw with python, although I am learning and trying to develop some tools. What I do need help with is a script tool which creates an index of rasters. It was created by someone who ...
1
vote
1answer
41 views

When building fieldmappings, how do I handle the SHAPE field?

I have a collection of hundreds of shape files and a python dictionary mapping the input field to the output field. I'm building my fieldmappings dynamically using this dictionary since it already ...
2
votes
4answers
170 views

How to export tables to Excel from ArcGIS 10.1 using the xlsxwriter python module?

(I've edited this question to reflect some of the answers/insights from below...) Original(ish) Question: I'm wondering if someone can share a bit of insight (or actual code) on how exactly to export ...
0
votes
0answers
67 views

Arcpy strip '{ and ]' from list return

I have a static list that I would like to pull values from and use in a query. I can populate the list dynamically from the data but the set is quite large and I think having a static list from a csv ...
2
votes
2answers
92 views

Proper syntax for Select Feature Layer by Location

Can someone let me know how I can use a single feature from one layer as the "Select Features" when using the Make Feature Layer by Location tool with another layer as the input? In the code below ...
0
votes
1answer
55 views

Counting Features to Calculate Field Value

Generally, I am trying to find the # of features in one shapefile within 1000 feet of EACH feature in a second shapefile - and then populate a field in the first shapefile with that #. More ...
0
votes
2answers
73 views

Arc Python add in - dynamic combo populate

I am attempting my very first python add in. what I would like it to do is look at a feature class, look through the town field. when the user selects a town I want the next combo box to populate with ...
1
vote
2answers
73 views

Arcpy - Calculate total time, last value minus first value

For the script tool I've written (below), one of the things I want to do is after user input has pulled tabular data (into a feature class) I want to take the last value of the 'logdt' and subtract it ...
-1
votes
3answers
126 views

Unable to connect to “Database Connections/.sde” from python

I just upgraded to 10.3.1 and now I am having issues running my administrative tasks set with Python scripts. I am unable to use the string "Database Connections/some.sde", i.e: ...
1
vote
2answers
53 views

SQL query new feature with loop

I'm trying to create an individual buffer feature class for each column of an input feature class, where there is a field that contains the buffer distance. I think there is a problem with my SQL ...
0
votes
1answer
27 views

Python brkLyr.supports (“dataSource”) Error

This is supposed to loop through a directory of MXD's and look for broken links and create a report. I am getting an error, an exception I believe, on one of the data sources. In the MXD it shows a ...
1
vote
2answers
95 views

Create an array from field values in ArcPy

I have a feature class that has a field of unique ID numbers. I would like to create an array of these numbers so I can loop over them in ArcPy. Any ideas?
0
votes
1answer
58 views

Select by attributes with user input using Python

I am new to GIS and Python is not my forte, so I am looking for some help. Ideally, what I am trying to do is create a tool that allows the user to select an address from my Address points layer. I ...
1
vote
1answer
78 views

arcpy; Select by attribute with an If, then statement

I am looking for some advice on how to construct an if, then statement based on a select by attribute SQL query or some other method (search cursor?). I am asking users to input a unique ID ...
0
votes
1answer
15 views

How to retain domain descriptions from selected features in database to new database?

I have the following script that selects features from an enterprise database and then exports them to a new database. However, two columns in the database contain domains. How can I keep the ...
1
vote
0answers
58 views

Extracting color values from layer to build index using ArcPy/ArcMap?

My university wants the maps we create to become more standardized and so we're changing all the colors on our base vector map. The new standard needs to be indexed and I have the task of creating ...
0
votes
2answers
54 views

ArcGIS Extract Data Tool

I am lookinig for a way to use an AOI to search and extract data from the data drive on the network at work. So, for example, I have folders of elevation data. Instead of sorthing through each folder ...
0
votes
0answers
69 views

Error in python code for map automation (loop)

I try to make this code work but I cannot find the error (not very familiar with python) The code should basically run through a file GDB where all the feature classes are stored. It then should ...
2
votes
0answers
46 views

Inserting accumulative attribute in dynamic text element based on Date field using ArcGIS for Desktop?

I've got a line feature class that contains Date field. I've made a layout view in order to display time animation of this feature class. I've managed to enable the time option in the layer and to ...
0
votes
0answers
34 views

Automating Raster Calculator [duplicate]

I am seeing mixed answers on other posts so I thought I would ask here. Is there a way to automate the raster calculator? I am trying to create a series of inundation maps at fine increments. It ...
1
vote
1answer
97 views

Script for selective dissolving of multiple features

I am kinda new to Python and arcpy and have done some basic online courses on this. So I do have an idea how these scripts are structured/written and how they work. Now I have to perform a seemingly ...
1
vote
1answer
45 views

Read raster at request size through Python

I'm trying to read the raster (tif) file using Python. What I want is to read the raster at a specific request size rather than its original resolution. Example: If a raster has a cellsize of 5 x ...
2
votes
1answer
133 views

Arcpy: formatting string for file name

I have the following question about formatting a string which I use to create output file names. I loop a SearchCursor to create .png file. I extract two columns form the cursor e.g. "GMS_ID" and ...
2
votes
1answer
48 views

Adding new records to attachment match table from select number of features from feature class using ArcPy?

I am seeking some ArcPy/Python help. I use the mobile app GIS Pro to collect data in the field, which allows me to export shapefiles containing a field called Photos, containing a list of names of ...
0
votes
1answer
50 views

Getting wrong results in Search Cursor of ArcPy/Python script? [closed]

I have two functions: First one will crated the feature layer second one will access the same created layer and prints the result. when i run my script first time it will print the wrong results. ...
2
votes
2answers
108 views

Creating shp from txt files using ArcPy?

I have a txt file like this: Point 0 347172.2 4269952.7 60.9090909091 1 337172.8 4278952.4 85.7334909091 2 344572.3 4547952.2 123.909673091 3 347532.8 8777952.8 456.467809091 END The third column ...
0
votes
2answers
68 views

Attribute field based off intersecting polygon

I need to add a polygon for each bookmark (which works fine) and then attribute a field based off which Zip Codes the bookmark polygon intersects. I dont know if I am on the right track. The code ...
0
votes
0answers
39 views

Feature Services & arcpy.ConsolidateMap_management & .replaceDataSource

We have several in house published feature services, including some from our Esri Data Stores. When I use arcpy.ConsolidateMap_management on an mxd (10.1) the Feature Services are nicely consolidated ...
0
votes
0answers
49 views

How to go about buffering different values in a field separately?

I have a clip of urban areas where the names are all messy with hyphens, apostrophe's etc so have decided to use the number value for each name to populate a list. My aim is to do analysis on each ...
0
votes
2answers
90 views

Automate entire map production in ArcMap?

I am trying to gather some information on how to create maps based on an existing base map I have. The basemap has all the data loaded. So the user will enter data into a form and the would do a save ...
0
votes
0answers
16 views

Small individual tables/crosstabs for points from Access to plot on maps

I currently have an Access database (accdb format) that is currently linked in GIS (ArcGIS 10.1) through an OLE DB connection. I have a groundwater analytical table with 36,000+ records that contains ...
0
votes
0answers
89 views

Calculate Lat/Long in decimal degrees

I'm trying to calculate the location of several points in a python script. However, the Add XY tool is in feet, rather than decimal degrees. The following Calculate Field lines just cause an error ...
0
votes
1answer
30 views

Error 000177: Failed to create relationship class in Python

I am trying to use python to create a relationship class between a feature class and dbf. I keep getting, "ERROR 000177: Relationship classes can only be created in the same database that ...
2
votes
1answer
45 views

Replacing layer ArcSDE connection

I am very new to using Python... I have an MXD with all of my layer files in it. They are grouped by category etc. Each layer file references a dataset within my SDE. My SDE has two different ...
0
votes
0answers
16 views

How to change features to have unique symbology color? [duplicate]

Say I have many features which need to have unique symbology color, how can I do this in ArcGIS 10.1. Possible using Python script? or Just simple tool in ArcToolBox.
1
vote
0answers
69 views

Are there any Python scripts available for Hydrology to compute watershed Basin from csv file?

Let's say I have surface data available in CSV format (x,y,z). In order to create a watershed basin from surface data, there are some intermediate steps we need to follow. ASCII to surface raster ...
0
votes
2answers
88 views

Iterating list returned by arcpy.ListFeatureClasses() gives error 'NoneType' object is not iterable?

I have the following code, where i write from a list of featureclasses the fisrt row of 2 specific fields to a text file. But when i run it either erases all the previous stored data from text or ...
1
vote
1answer
45 views

Python script to accumulate flow volumes for a pipeline geometric network

I have a point wells layer and a polyline pipeline layer. The wells are snapped to the end of the pipeline segments. The wells layer has weekly updated flow volumes and I'd like to find a way to ...
0
votes
1answer
51 views

MERGE/ COMBINE two ADJACENT CONTOUR-LINES with Python

I am a python begginer; I found a script that "BARBOSSA" posted in the "blog" ( Append or merge consecutive line segments (contours) as one single line of the same elevation value) I am trying to use ...
1
vote
2answers
62 views

Using lists to work with feature classes having different spatial references in ArcPy?

This is my first arcpy script attempting to use lists. Input: 4 dif Excel files, each with a dif spatial reference Output: 4 dif feature classes (in same geodatabase), each with original spatial ...
0
votes
1answer
43 views

Error using UpdateCursor to copy a GlobalID field

I am trying to use an Update Cursor to copy a GlobalID field into a string field. However, I keep getting an error saying "Objects in this class cannot be updated outside an edit session [Medians]". ...