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)

2
votes
1answer
222 views

Limits to processing files from a list of rasters

I have written a script which selects all files that are within or subset by an area of interest polygon. This works fine but when the file list it's working has more than 150 records it stops ...
2
votes
1answer
486 views

Making RasterToASCII_conversion observe environment setting for output cell size?

I have two rasters (an ESRI grid and an IMAGINE image) that differ in projection, extent and cell size. I want to convert the IMAGINE to an ASCII, and want it to have the extent, cell size and ...
2
votes
1answer
818 views

Creating Python script to merge broken polylines from Microstation CAD file in ArcGIS? [closed]

I have tried using the dissolve tool with unsplit_lines option but it does not merge the lines ... maybe there is a step I am missing?
2
votes
1answer
200 views

Out of Range error when creating thumbnails of MXDs

I am tryting to create thumbnails of all the mxd's in a directory but no mater how high I set the value of the "While" loop it gives me an "Index out of range" error... Also can I get it to look at ...
2
votes
1answer
187 views

Does arcpy.AggregatePoints_cartography create multiple polygons?

Does this function allow you to put in an array of points, which may, or may not, be representative of many polygons, and create many polygons from it, or just the one, linked?
2
votes
1answer
558 views

Can I create a balloon callout on an address point on a published map?

Very new to this, so please excuse any ignorant question! I've created a vb.net app to open a published map in ArcReader. Have a few questions... First, I started with the query attribute sample ...
2
votes
0answers
22 views

Pixel based Regression

I have 80 .tif files, and each pixel value represents NDVI. The whole stack of images is a time-series. I want to run a regression for each pixel using NDVI and time. I have tried to approach this ...
2
votes
1answer
22 views

Grid cells group analysis?

I have a grid of cells with different values: I would like to analyze a group of 5 cells to check if they have the same values (group S1 and S3 display same value for all cells, not S2). This ...
2
votes
0answers
38 views

Using Arcpy.UpdateCursor to delete adjacency rows based on a group ID

I have this sample file shown in the picture 1 below. it is a sample data set of a phone survey of drivers. I am trying to find out when those drivers started to drive. My main goal is to build a ...
2
votes
0answers
20 views

How to export specific DDPs from a set of DDPs?

I have a set of data driven pages and I would like to have a string parameter in the tool that allows me to export specific pages from the set of data driven pages. An example would be if I had a set ...
2
votes
0answers
57 views

ArcGIS Dissolve failing with small polygons

I have an arcpy script which clips (Clip_analysis) a shapefile of polygons to a grid square, converts any multipart polygons created to singlepart polygons (MultipartToSinglepart_management), runs ...
2
votes
0answers
32 views

Creating a Legend with arcpy and comtypes

I am relatively new working with python and arcobjects. Under normal limitations I know that you cannot create a Legend or any arcobject with arcpy.mapping. Is there a generic example of creating a ...
2
votes
0answers
17 views

How to create .sat files for .jpg tiles

I want to create map overlays for a TomTom GPS. Relief shading, ortophoto etc as map background while navigating in Map View mode. Instructions for creating custom overlay can be found here So far ...
2
votes
0answers
73 views

intermittent failures with SelectByLocation in an ArcPy addin

ArcGIS 10.2, Windows 10 this is the line that fails: arcpy.SelectLayerByLocation_management(WRS_layer, "INTERSECT", gridLayer, "", "NEW_SELECTION") The WRS_layer is in a file gdb, the gridLayer ...
2
votes
1answer
29 views

Error in <module> arcpy.SelectLayerByLocation_management [duplicate]

I am writing a Python code and have trouble adding a layer to the program. I face this problem below: Traceback (most recent call last): File "G:\arcpy workspace\python learning codes\loc.py", line ...
2
votes
0answers
28 views

Python Script to apply the Northing and Easting of a photo center .shp file to a tiff. [duplicate]

I have a group of tiffs I want to georeference. I have the photo centers for each of the tiffs but they are not linked. After looking at the comments I believe there would be a way to take the ...
2
votes
0answers
30 views

How to get 4 values for different Indexes and names of rasters for set of points? [closed]

I am trying to get 4 values for different Indexes and names of rasters for set of points, but get problem with defining function def extractIndex(raster, pathName). #List of Folders 4 Folders ...
2
votes
0answers
28 views

Using arcpy to loop through multiple network analysis tasks

I am writing a script with ArcPy to look at modelling closed roads and the length of possible diversions. This is being done with the network analyst tools. The basic process I am using is to: ...
2
votes
1answer
41 views

Multiple Input Feature Classes with Different Names - Model Builder

I have created the model below to create "straight lines" from a route (Feature Class is the Route in the model). This model will save me a lot of time compared to doing it manual. The manual steps ...
2
votes
0answers
43 views

ListFeatureClasses isn't returning anything in GDB [closed]

I am writing a script that performs a series of operations on line, point, and polygon files in my file geodatabase matched through a unique number in their filenames. My geodatabase looks like this: ...
2
votes
1answer
47 views

How to select certain fields from a feature class to create a new feature class

I am stuck on how to create multiple features classes from one feature class using a select few fields. I have the following attribute table for a shapefile. I would like to select the 'USAF', '...
2
votes
0answers
52 views

Identifying lines of one feature class that touch another feature class with their endpoints in ArcMap? [closed]

I want to find out and select the features of one feature class, which both endpoints touch another feature class. In the picture above it would be the left pink line which touches feature of ...
2
votes
0answers
39 views

extracting raster using values

I have an original .tif file which has values ranging from 2 to 28. From that original .tif file, I am extracting cells having a value of >=10 using the following code: import arcpy, os from arcpy ...
2
votes
0answers
60 views

Determining EPSG code for coordinate transformation using ArcPy? [closed]

I am trying to write a Python script which will identify the EPSG code for the coordinate transformation. I am familiar with the dataFrame.geographicTransformations function, however this returns a ...
2
votes
1answer
61 views

Field Calculator is not calculating selection from Make Feature Layer in arcpy

I am trying to use field calculator to calculate 3 different fields in python from a Make Feature Layer variable. It calculates the first field (MATERIAL_T) but then it doesn't calculate the second ...
2
votes
0answers
71 views

Select by location not selecting all features in ArcPy [duplicate]

I am having an issue with the "select layer by location" tool in my ArcPy script, that may be due to a hidden memory error. Using one feature class with 281 polygons, I would like to select all of the ...
2
votes
0answers
76 views

Output from geoprocessing service [closed]

I am using ArcMap 10.3.1. I have created a custom tool using a python script, the code for which is listed below, that uses a lookup table to reclassify vector data. When run on the local machine the ...
2
votes
1answer
23 views

How to skip ArcOnline MXDs(ArcPy)

I've previously posted a question about an ArcPy tool that walks through a specified area and scans all MXDs and associated Layers and reports them (as well as the inverse) Search for a shape-file of ...
2
votes
0answers
111 views

Merge n number of adjacent polygons [closed]

I have over 17,000 individual polygons. I want to merge two adjacent polygons so that I finish with approximately 8,500 polygons. The polygons need to be merged based on location, merge two adjacent ...
2
votes
0answers
48 views

How do I speed up testing debugging when I am loading a large module as part of my program? [closed]

I'm using PyScripter to do some python geocoding automation and I'm coming across the situation where I am waiting several tens of seconds for a large module to be imported. This is very inconvenient ...
2
votes
0answers
51 views

Extracting Mean from Raster and Writing to Table in ArcPy?

I am simply trying to extract the mean of each raster within a geodatabase and write the value to a table. I have done this successfully with another set of rasters, but now I keep getting the ...
2
votes
2answers
54 views

How to use loop to add georeferenced JPEGs from folder to mxd?

This is my first time using this site and I'm a bit new to ArcPy. I've looked around for a while but couldn't quite find the answer I was looking for. I have many folders with georeferenced topos in ...
2
votes
0answers
85 views

Benchmarking ArcPy / ArcMap Performance on different computers?

This project came out of my need to build a justification for a faster work computer. Before asking for new equipment I want to be prepared to show the increase in performance by adding RAM or more ...
2
votes
0answers
85 views

Reading feature class attributes with or without quotes in ArcPy?

I'm working on a script that clips a batch of feature classes by a selection made in another feature class. The way it works is by reading the clip feature fields, then allowing the user to select the ...
2
votes
0answers
90 views

arcpy.AddIndex_management error for in_memory variable

I am trying to optimize a script that uses addJoin_management. To do this efficiently, I am attempting to add an attribute index on the join table. I am getting a generic error when i do this though. ...
2
votes
0answers
100 views

arcgisscripting.ExecuteError: ERROR 001270: Consolidating the data failed

I am working on PuTTY and trying to create service definition file in server. My Python script is creating .sddraft but I am receiving 'Consolidating the data failed' error when I run stage service ...
2
votes
0answers
58 views

Arcpy.sa NoData issue with saving TIFF

Similar to the poster here, I am attempting to convert numerical NoData values to actual NoData cells. The solution in the linked question doesn't work for me, however, as when I use the save method ...
2
votes
1answer
114 views

Add/Remove Relate using ArcPy without ArcGIS Pro?

I am trying to add a relate between 2 feature classes so that I can use the area of the related table to update a field in the original table. I found that ArcGIS Pro (http://pro.arcgis.com/en/pro-...
2
votes
1answer
30 views

Arcpy.addTable() error

I am having a little trouble debugging an ex-coworkers code. I was wondering if the SE community could be another set of eyes and help me. I am receiving this error: RuntimeError: FieldMappings: ...
2
votes
0answers
101 views

How to speed up my script? [closed]

I am looking for the way to speed up my script. It is working fine, I mean, the final output is as required, but it is clunky and really slow. It is slow because of the double 'for..in..' loops, I ...
2
votes
0answers
87 views

Extracting Multivalues to Points from NETCDF4 Raster using ArcPy seems imprecise?

I'm getting some strange results in a multivalues to points extraction from a NETCDF4 layer from the MERRA reanalysis product. In particular, it seems like the values being assigned are way off in ...
2
votes
0answers
107 views

Error when stop editing a feature in ArcPy [closed]

I want to make changes in a feature attribute table that is an edge source of a Network dataset. In the next step, I need to rebuild the Network to make the changes take efect. The problem is that, ...
2
votes
2answers
269 views

Reading through contents of layer file using ArcPy?

I have a collection of rasters (all in separate geodatabases) that I am trying to put into a MOSAIC using a python script. I have a bunch of these to make so I was thinking that the easiest way to do ...
2
votes
0answers
77 views

Improving performance of Laspy? [closed]

I have a working code for a project, but right now to run through the data it would take years to be completed. Please help me to improve it: import laspy import laspy.file import numpy as np (...
2
votes
0answers
58 views

Intersect does not fully process [closed]

Goal: Use python script to find overlap between various shapefiles in folders Inputs: folder 1 with multiple shapefiles and folder two with multiple shapefiles Method: #First intersection ...
2
votes
0answers
150 views

How to add a separator to an ArcGIS python add-in menu?

In several places (e.g. Making separator and button menu in customized Toolbar using ArcObjects?) I have seen it mentioned that the way to add a separator for add-in menus and toolbars is adding the ...
2
votes
0answers
30 views

Programmatically change the template of the layout [duplicate]

Is there a way to change the layout with arcpy? Here are images of the steps I want to do programmatically. The file I want to choose already exists and I want to hardcode its path in the script....
2
votes
0answers
62 views

Altering input files in a Python toolbox? [closed]

I'm trying to add a temporary field to one of the input feature classes in my Python toolbox. arcpy.AddWarning("Adding field of type " + fieldType.upper() + " to FC " + varFC + " called " + ...
2
votes
1answer
134 views

Getting coordinates at location n meters from known point to NW and SE using ArcPy?

I have a point shapefile or feature class and I want to create bounding boxes around each point. The size of the bounding box will depend on user input, for example the user might want a bounding box ...
2
votes
1answer
159 views

What is the purpose of arcpy.Array()?

I am wondering what the purpose of arcpy.Array() is. It seems an intermediate step between creating a list of objects and performing some sort of conversion, for example, such as in the sample code ...