A site-package created by Esri to expose GeoProcessing from ArcGIS to Python.

learn more… | top users | synonyms (7)

1
vote
0answers
32 views

Using arcpy to add several rasters

I need to do some raster/vector processing on some non-overlapping tiles. My python script needs to find the correct tiles and then extract the raster values and count them up. My script needs to be ...
1
vote
0answers
30 views

Counting Subdatasets in GRIB using ArcPy?

I'm trying to utilize the extractSubdataset_management tool on a large set of GRB files. Each GRB file has a different number of subdatasets. Is there any way to execute this tool on all subdatasets ...
1
vote
0answers
46 views

Zonal histogram script VALUE row suffix problem

I'm running 2 Python scripts. The first it is to apply Zonal Histogram to several rasters. The second it is for saving the Zonal Histograms to a text file. My problem is when the first script creates ...
1
vote
0answers
63 views

Overwrite existing Map Service through ArcPy keeping the existing cache tiling scheme

This is a follow-up question to Overwrite existing map service in ArcGIS Server 10.1 (through ArcPy) The issue arises when I try to overwrite a map service that has a cache already defined. If I ...
1
vote
0answers
83 views

TypeError: unsupported operand type(s) for *: 'numpy.ndarray' and 'numpy.ndarray'

I am trying to insert a value for different group of percentile eg (0- 10 percentitle) value = 1. I saw an example over here and went to try it out How do I Calculate Grouped Percentiles or Batch ...
1
vote
0answers
43 views

Using arcpy.Geometry() and attribute table?

I have Polygon layer (*.shp) and I need to calculate shortest distance between every polygon's and save it into a txt file with ID (it is in attribute table) for every polygon. example of txt file - ...
1
vote
0answers
56 views

Calculating areas in metric units on polygons that are stored in geographic coordinate reference system using ArcPy?

If one uses arcpy to calculate areas for a field in metric units on a polygon shapefile in a geographic coordinate system it will work, and give you plausible results. According to the documentation ...
1
vote
0answers
94 views

Automate multiple repetitive ArcGIS 10.2 Table Relates?

I have a situation where multiple users will be creating many file gdb's in ArcGIS 10.2 using just the basic license. The data format is standardized and will have a feature layer with point data and ...
1
vote
0answers
48 views

Changing label symbology in ArcPy?

I'm trying to change the default symbol (font, halo etc) for labels of a layer that I am adding to an mxd. Below is what I have so far, but the template layer font style didn't show up in the map. ...
1
vote
0answers
38 views

Dividing points into Polygons based on an Attribute of that point and its relative distance to other points and a facility

I have random point data (school locations) that I need to divide into 'n' polygons (regions) based on: their distance to a facility, their relative distance to each other, and an attribute of that ...
1
vote
0answers
63 views

How to create 10 day averages of a multiyear daily raster time series?

I have a set of daily modis LST rasters (.tif) over a roughly 13 year period (2002-2015). I would like to group them by 10 day periods, i.e. bin 1 = julian day(jd) 0-9, bin 2 = jd 10-19, etc so that ...
1
vote
0answers
195 views

Runtime Error: Cannot Open Feature Class in Editor Session

I am using an update cursor in a script and need to make edits from arcpy.da.Editor. The error that is being thrown is a Runtime Error where the feature class cannot be opened. import arcpy import ...
1
vote
0answers
88 views

Setting field defaults/domains based on subtypes

I have a rather complicated FeatureClass, in which one of the fields has a different default value, and a different domain, depending on the value in the nominated SubType field. Using the rather ...
1
vote
0answers
46 views

How do you use the setErrorMessage(message:string) within the ToolValidator Class?

The Programming ToolValidor Class ArcGIS Help menu states that: the following method: setErrorMessage(message:string) "Marks the parameter as having an error (a red X) with the supplied message. Tools ...
1
vote
0answers
61 views

Using the 'Mean' mergeRule with a spatial join

I have two feature classes. The first is a point file, derived from a raster, with the values for slope of the terrain. The second is a shapefile of polygons. What I want to do is spatially join the ...
1
vote
0answers
39 views

PyScripter auto-complete pop-up help?

How do I get the pop-up help window that's part of the auto-complete to show more definitions of the tool being used? For example in the attached image the definitions of "Buffer_analysis" inputs ...
1
vote
0answers
75 views

Clip layout view to output graphics extent using python

I need to implement, within this very simple piece of code, the option that replicate the "Clip to output graphics extent" available from the ArcGIS 10.0 Export Map UI standard command. Is it ...
1
vote
0answers
173 views

Creating multipart polygons with ArcPy? Dissolve Failure?

I need the functionality of the editor > merge command for use in a python script tool. I realize this function is not directly accessible through ArcPy, but I am hoping someone can help with a work ...
1
vote
0answers
68 views

How to align hundreds of rasters quickly

I'm hoping to accurately align hundreds of aerial images that are slightly off-kilter. The images cover the same area on different dates (several acres). They contain identifiable features around ...
1
vote
0answers
33 views

surface area in a basin with reference to incremental height of DAM

I want to calculate "surface area in a basin with reference to incremental height of DAM" i tried this: step_size = 10 # metres; reduce this if you want finer resolution num_steps = 20 # increase ...
1
vote
0answers
20 views

Bringing Alias properties with Feature Class to Feature Class Tool?

I am using arcpy.FeatureClassToFeatureClass_conversion(fc, outWorkspace, fc) to move many FC's to a new location. I have found that it is only bringing the FC Name property and imposing that on the ...
1
vote
0answers
67 views

How to correctly input complex multiband functions in Raster Calculator?

I'm trying to compute a MTVI2 (Modified Triangular Vegetation Index - Improved) and EVI (Enhanced Vegetation Index) from Landsat 8 imagery. My formulas are as follow (I'm using ModelBuilder): MTVI2= ...
1
vote
0answers
31 views

How do I data page with arcpy?

I have a enterprise SDE feature class and need to retrieve its data. Attempting to copy all the data at once appears to be problematic. How do I take a feature class and split up the data retrieval ...
1
vote
0answers
74 views

Extract multiple grids from HDF with subset tool using ArcPy

This should be fairly simple thing but bugging me at the moment. I have ~5k HDF files in a folder with names: MOD11A1.A2001001.h24v05.005.2006343042921 and so on..... I have following which loop ...
1
vote
0answers
34 views

Sorting cursor made of Network Analyst outputs?

I have solved OD Cost Matrix analysis and I'm trying to access the results using da.SearchCursor with SQL sorting. The problem is that the result is not sorted at all. lines = ...
1
vote
0answers
86 views

ArcPy reading a raster in a moving window?

I typically read large raster data using gdal and setting up a moving window of 256*256 pixels (for example). I recently had to do some processing using arcpy, so I did the same thing, using ...
1
vote
0answers
130 views

How to automatically generate pour points along stream network?

The following screenshot shows the results of a water flow analysis where I identified stream order via the Strahler method in ArcGIS. Now I need to generate watersheds for 2nd order streams and ...
1
vote
0answers
43 views

Why is arcpy ChangePrivileges_management adding a second feature class to map?

I am new to GIS and pretty new to python, so sorry if this is ugly code. I am creating a feature class in a postgres database if it does not already exist and the user wants it created. That works ...
1
vote
0answers
205 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 ...
1
vote
0answers
66 views

Clipping Feature Classes by Data View Extents with ArcPy?

Have a fully functional script about 90% of the time. It is that 10% that is really bothering me and I cannot seem to deduce a solution. Script will take the user defined dataframe view extents and ...
1
vote
0answers
276 views

Update Data Driven Pages Index layer via Python

I am trying to find a way to update the index layer for data driven pages through arcpy. I understand that to access DDP from arcpy.mapping you need to be referencing a MXD that has DDP enabled. My ...
1
vote
0answers
75 views

Checking if Terrain Model has pyramids or data sources using ArcPy/Python?

I asked this question in the ESRI forums and got nothing but a lesson on LAS point cloud classifications — not even remotely what I had asked. I’m hoping someone here can point me in the right ...
1
vote
0answers
97 views

Select Visible Rasters (Mosaic Datasets) using ArcPy?

I am wondering if anyone knows if there is arcpy functionality available in ArcGIS 10.3 or can be coded easily to replicate the select visible rasters command (manually right clicking on a Mosaic ...
1
vote
0answers
91 views

Problem with schema synchronization using Import Replica Schema (Data Management)

I want to synchronize the schema of replica. The steps I am following is documented in ArcGIS Resources: Export the geodatabase_1 replica schema using Export Replica Schema (Data Management) tool. ...
1
vote
0answers
84 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
273 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 ...
1
vote
0answers
99 views

Error when kriging: “output variance prediction raster”

I am trying to run a python script for kriging, but keep getting a following error message. It doesn't make any sense as the output variance prediction raster is optional. The code: # Create ...
1
vote
0answers
100 views

Are there any conditions that could break the creation of an arcpy.Polygon object?

I have a script that generates a mesh network from vertex and centroid inputs, and it works for almost all my points. But for some records that get created in the feature class via the script, their ...
1
vote
0answers
211 views

Batch Convert GRID to TIFF with colormap and RGB

There are lots of questions on here regarding raster conversion, but I can't find anything specific to my needs (involving output as RGB and using a Colormap). I have a folder full of ESRI GRID ...
1
vote
0answers
57 views

netcdf python error

I am basically copying and pasting the code provided on Esri's website and every time I try to run it in ipython, the program crashes and needs to restart the kernels. The code is below, does anyone ...
1
vote
0answers
102 views

Is there PostGIS equivalent to arcpy.sa.Slice() function?

I have an existing system built on an 8.3 PostgreSQL database which uses a ArcGIS - Spatial Analyst for a couple of raster operations. The system is moving to PostgreSQL 9.2 and I'm evaluating if the ...
1
vote
0answers
49 views

Arcpy script or other method for points in polygon per participant

Is there an Arcpy script or another way that I could use to find out the number of GPS points falling within each participant’s home neighbourhood as defined by an 800 meter network buffer around the ...
1
vote
0answers
219 views

Calling a GP service from a GP service arcpy.Importtoolbox

I'll try my best not to sound like a lunatic as I explain this. I have a python script that calls an ArcServer geoprocessing service toolbox with arcpy.Importtoolbox. The GP service is on several ...
1
vote
0answers
219 views

Creating TIN, Surface Difference python script with ArcPy?

I have been trying to develop a master script to go through a series of geoprocessing tools and executing them. I am trying to generate a TIN and contours from a raw xyz file. Below is a very simple ...
1
vote
0answers
108 views

How can I extract the measurelength, highmeasure and lowmeasure of routes in ArcGIS

I'm trying to create road Routes in ArcGIS, which traditionally have been created using workstation. I've managed to write a Python script to do this, however, unlike ArcInfo, the attributes ...
1
vote
0answers
123 views

ArcSDESQLExecute to query and update from multiple SDE Databases

I am trying to use ArcSDESQLExecute to return the results of a join and then write the return query into a Feature Class located in a different database. Using Microsoft SQL Server and Arc10.2.2 Is ...
1
vote
0answers
22 views

Changing Area Output - PUMAS

I currently have shapefile of US PUMAS and another feature shape file (call it feature X). I am using arcpy to project both of these files to the following projection coordinate system (using ...
1
vote
0answers
250 views

arcpy, CalculateField: 'geoprocessing sys.stdout object' object has no attribute 'flush'

Working with 10.2.2, 64bit geoprocessing arcpy installation. Getting this error from arcpy.CalculateField_management() command. From Spyder IDE in an ipython console, I get the error: [IPKernelApp] ...
1
vote
0answers
171 views

Update Layer Symbology based on 1 field with changing data

I am running ArcGIS 10.2.2 Version 10.2.2.3552, using ArcMap. I have quite a big task here and before i attempt it i want to know if it is even possible. I've looked up some similar questions on ...
1
vote
0answers
86 views

How to to get time slice in raster dataset using ArcGIS?

I have a couple of rasters made in different time. Some of the rasters are overlapping and some of them - not. I need fast and efficient way to get time sliced values for each pixel. For example: ...