A site-package created by Esri to expose ArcGIS for Desktop (and ArcGIS Pro) geoprocessing, mapping, etc, to Python.

learn more… | top users | synonyms (8)

0
votes
0answers
35 views

Table not appearing when using ExportToPDF in standalone arcpy script?

I am writing a script using arcpy.mapping that takes a template mxd and adds in data to generate a report. The template mxd contains a table on the layout which was added via the table options menu -> ...
1
vote
1answer
73 views

Convert string into date format problems

I have a string column within an attribute table that has a string in the format of: yyyyMMdd HH:mm:ss (i.e 20150417 13:32:05) I've tried using the convert time field tool within the python IDE in ...
4
votes
1answer
100 views

Installing ArcPy (from ArcGIS Pro) with Anaconda?

I would like to use ArcPy from ArcGIS Pro with my Anaconda install. ArcGIS Pro installs a 64bit python3 version of arcpy. How do I add this version of arcpy to my anaconda 64bit python3 install? And ...
0
votes
2answers
86 views

Labelling layers with Python

I need to turn labels on for previously used layer. Here is the code: import arcpy import sys from arcpy import env env.overwriteOutput = 1 gp = arcgisscripting.create(9.3) fc_Mord = arcpy....
1
vote
0answers
74 views

Python/Arcpy Crashing [closed]

I am running a fairly large script where I export to a PDF. Now I added an export to Excel along with export to PDF from the same MXD. The Python window says python.exe has stopped working, ends then ...
2
votes
1answer
62 views

Arcpy Join field options

I am looping through Municipalities and clipping a layer called AllZones containing Multiple Facility (FACID) with multiple chemicals per Facility (CID). 1 to many relationship FacilityID, ...
1
vote
0answers
39 views

spatial join field mapping Arcpy, change merge rule

I have a line feature class which represents a stream network. At a confluence of two river segments, I'm joining the stream segments to the point of intersection via spatial join (one to one join). I ...
0
votes
0answers
30 views

Iterate value of a given field to create sequential value in another field in same feature class

The dilemma I'm trying to work through seems simple enough yet with limited Python experience not sure how to approach in Model Builder. I have a parcel feature class stamped with Twnshp, Range, and ...
0
votes
3answers
99 views

Use if statement to delete row data, ArcGIS 10.3.1, Python 2.7

I have a indoor positioning shp file. I need to do the data cleaning for the further analysis. and here is the attribute table: Field(Sheet1_minor) is the name of beacon, and Fields(Beacon_41_B1,B2,...
0
votes
2answers
46 views

Randomly extract value in time dimension at point location from NetCDF?

I have a set of point locations (point feature dataset) and a netCDF file containing 30 years of daily precipitation data. My goal is to randomly select a precipitation value in the time dimension ...
0
votes
1answer
48 views

Arcpy Slow to Read Datasets from Connection (.sde) File

I'm looking to automate publishing map services to ArcGIS Server, and in doing so I'm creating map documents that have only one layer; each layer is from a SQL Server 2014 database that I am accessing ...
2
votes
1answer
53 views

Query over all layers in a mxd Arcpy

A newbie to python here. Ive been trying to query all layers on a mxd and have sucessfully implemented a script by advice on here. What I need to do now is to firstly make the query a parameter that ...
0
votes
0answers
7 views

using the output from Make NetCDF Table View for table to table

I have a nc file and I used Make NetCDF Table View tool to build a table view and then use table to table tool to make a .dbf file. when I do it manually in ArcGIS it is done but when I use stand ...
1
vote
1answer
62 views

Calculating distances with SciPy and subsequently join identifiers

I have lots of start points and a handful of destination points. Using 'Point Distance' from the toolbox takes ages to calculate and write the results. Hence, I was looking for alternatives and went ...
1
vote
1answer
21 views

exporting attribute tables of multiple rasters to excel

I had a raster and I clipped it using a shapefile of polygons. Now I have about 5500 individual raster images. I have to export the attribute table of each raster to excel so that I can then append ...
0
votes
1answer
36 views

Finding the overall weighted centroid from other centroids [closed]

I'm new to python, and I'm trying to find the overall weighted population centroid of a state, using the unweighted centroid from counties. These unweighted centroids already have a popualtion field ("...
2
votes
1answer
41 views

Access resolved/rendered dynamic text from ArcPy or ArcObjects?

Using ArcPy (or ArcObjects if essential), is there a way to retrieve the rendered text of a text element that includes Dynamic Text? The text property of the TextElement includes the Dynamic Text ...
0
votes
1answer
60 views

Explanation of HAND (height above nearest drainage) model procedure

i tried to follow this procedure Spatial Analysis - Calculate a cells elevation (height) above the nearest stream cell but i have some problem to understand everything. I mean the 2th answer in the ...
0
votes
0answers
34 views

Average raster to single value in ArcMap

I need to shift a raster a small bit. I got the distance and the direction using the path distance and cost path tools. I walked into two problems. I have a raster with distance values. I want to ...
0
votes
1answer
35 views

Exporting graduated symbology to pdf [closed]

I'm creating a mapbook(PDF) of all California's counties with its population centroid. The code runs, but the graduated symbology for the centroid is not displaying on the pdf. # Imports import os, ...
2
votes
1answer
43 views

Getting inset map selected and magnified in ArcPy?

I want to create a mapbook(PDF) of all states in USA, and also create an inset map by using a second data frame. I got my mapbook to run, but then I can't get the inset map in the second data frame ...
0
votes
1answer
26 views

Shapefile not displaying points (vertices) in ArcMap

this code finds all the vertices of every census tract for the state of California and Colorado. The code runs, and creates a shapefile with all proper filled fields (totpop, XCoord,YCoord, area1 etc.)...
4
votes
3answers
94 views

Batch Clipping Single Raster with Multiple Shapefiles in ArcPy?

I have a single raster file and about 40 small polygons shapes. I would like to clip the raster by the extent of all these shapes, and create 40 resulting .img files. I know I can just do this by ...
0
votes
1answer
35 views

Assign multiple domains to multiple feature classes within a geodatabase

I have a geodatabase that has multiple domains (50 +) and I want to assign them to specific feature class fields (there's over 50 feature classes) in an automated way because I'd like to run this ...
3
votes
1answer
70 views

Why does my python script run out of memory from IDLE but runs Ok from Python Window in ArcMap?

Why does my code work in ArcMap but not in IDLE? It is similar to: why does arcpy function work in ArcMap python window but not from stand-alone script? except that the answer to that question does ...
1
vote
3answers
40 views

ArcGIS Dissolve/SQL group by

I have a GIS layer that has thousands of Facility IDs. For each Facility ID there can be multiple Chemical ID's. For each chemical ID there is a maximum of 3 zone types. Zone A, B, C. But there is not ...
0
votes
0answers
26 views

Raster result is different for arcpy.sa CON and arcpy.gp.Con_sa

I have to add two rasters, one bigger than the other, but before adding I have to set the value of NODATA of smaller raster to the value of bigger raster. So i used the following code to do it: ...
0
votes
0answers
37 views

ArcGis 10.2.2. - Spatial Analyst - Zonal statistics as table fails on feature class with many polygons - within script for overlapping polygons

I am using a script to calculate zonal statistics as table for overlapping polygons. #------------------------------------------------------------------ # makeZones.py # Find zonal statistics as a ...
0
votes
1answer
62 views

Copy query feature layer into a feature class - error 000732

I am trying to create a python script to copy data from a MSSQL view (includes a geometry field) into a feature class. They are both held within the same database. I have tried arcpy....
2
votes
1answer
60 views

saving survey123 data programmatically using python

I'm recording data using the Survey123 app which logs data into a standard ESRI rest service, stored in my AGOL account. I would like to save this data an SDE dataset. Is it possible to do so using ...
2
votes
1answer
30 views

Adding values from list into Attribute with UpdateCursor?

I have a list of values of buildings total height and want to update the corresponding field in the shapefile. fclass is my shapefile totalh is the field which i want to update totaheight is a list ...
1
vote
1answer
76 views

Max width and Max length of a polygon?

Is there a way to calculate the max width and length of a polygon or polygons? I'm currently working with roughly 10K+ building interior layouts. What I'm trying to do is generate and populate an SQL/...
0
votes
1answer
41 views

What size of activeDataFrame? [closed]

I want to write a script in Python for ArcGIS to search for the size of an activeDataFrame (DataFrame) in meters (scale)?
2
votes
1answer
68 views

ArcPy Insert cursor losing vertices when writing Polygon features?

I'm currently trying to code a geodesic buffer from points (the one that is implemented in ArcGIS is very slow). The idea is to calculate 100 point coordinates (P_Buffer) around an initial point (P) ...
3
votes
2answers
100 views

How do I physically order overlapping ArcGIS features?

I have a feature class with multiple overlapping polygons. It's a highways fc and contains underpasses, overpasses and at grade roads & intersections. The problem I have encountered is that the ...
1
vote
1answer
46 views

Unique pairs based on multi values

I will try to be as detailed as I can with the purpose and walkthrough of the situation. I have 2 Feature Classes (fc1 and fc2). fc1 is a polygon shapefile with no overlapping polygons and an id for ...
1
vote
0answers
28 views

Using ArcPy to run Create Random Raster tool executes successfully every other time, but fails with ERROR 999999 on alternate runs?

I am trying to create a python script to run several ArcMap tools in succession on a DEM. The script will ideally create a random raster (based on a normal distribution, with a mean of 0 and a ...
1
vote
1answer
43 views

Arcpy Spatial Join Fails: Field is Not Nullable

We are working to perform a spatial join of a very large point .shp of voters (target_features) with another of incidents (join_features). arcpy.SpatialJoin_analysis(target_features, join_features, ...
0
votes
1answer
35 views

Holding onto row values while using cursors

I'd like to be able to use an update cursor to go through rows in a table, holding onto the previous rows value, and comparing it to the current row value, to populate a new field with this value. ...
1
vote
1answer
41 views

ArcGIS- Add feature names to coded value list for domain

I've got two feature classes, "Points" and "Lines", the first is a feature point class, the other is a line class. I've got a coded value domain field for the "Points" class, that I'd like to add the ...
0
votes
1answer
28 views

Cannot import arcpy in arcGIS 10.3.1 [closed]

While I try to load the arcpy module in arcGIS 10.3.1 I get the following error message: Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> ...
0
votes
2answers
48 views

Removing duplicated layers using ArcPy?

I work with ArcGIS 10.3.1. I my map i have 200 layers. some of them repeat several times. Is it possible with python code to remove all duplicated layers from table of content, that have the same ...
1
vote
1answer
61 views

SelectLayerByLocation_management gives ERROR 000368: Invalid input data?

I'm trying to use SelectLayerByLocation_managment in a script and keep getting the following error: ExecuteError: Failed to execute. Parameters are not valid. ERROR 000368: Invalid input data. ERROR ...
0
votes
1answer
20 views

Sublayers do not exist or are not supported in the geoprocessing tool?

I'm trying to batch export selected layers that I drag and drop in the tool that I've created by a selecting feature class. It's working when features are input from the source and layers in TOC. ...
0
votes
1answer
70 views

Using arcpy.SearchCursor() for multivalue field?

I need to make a multivalue field to be selected as:   Input_Features = arcpy.GetParameterAsText (0) Num_Pop = arcpy.GetParameterAsText (1) #(It contains population data for the periods 2020, 2025, ...
1
vote
2answers
22 views

Arcpy label white color

I have this label expression within a function that works great. I want to turn the color to white. lblClass.expression = '"{}" + [OBJECTID] + "{}"'.format("<FNT size = '10'>","</FNT>") ...
1
vote
0answers
16 views

Select by location error in python script : “Fetch Geometries” window [closed]

I have a python script used as a source code for a ScriptTool in ArcGIS that is supposed to select road segments from a selection by location with a mask (polygon feature class).Everything worked fine ...
0
votes
2answers
39 views

Arcpy Select by attributes IN operator with Tuple

I have two layers 1. Buffer zones with a string ID 2. the same buffer zones with the String ID plus an extra field call it zone B *this process is taking place within a loop already, just to give ...
3
votes
0answers
50 views

Reading Jp2 compression level using ArcPy?

Is the compression quality level used to create a JPEG2000 image stored somewhere inside the file, and how to read it? I would like to know if my images where generated using a lossless compression ...
1
vote
1answer
44 views

Zonal Statistics ArcMap 10.4

I have a problem using Zonal statistics in python using ArcMap 10.4. This is a completely random error, and I have no idea what to do. Some back ground is that I have been running a script doing ...