2
votes
1answer
88 views

calculating zonal statistics of raster data in multiple overlapping zones and combining them into one table

The aim here is to calculate the max, min, mean, range, sum, count and std of raster data contained in areas delimited by polygons (much like what the Zonal Statistics as a Table tool from Spatial ...
1
vote
2answers
74 views

Open source, Python option for Arcpy's Con tool?

I'm wondering if there is a method to perform a function similar to Arc's Con tool, using open source options in python. I have two rasters, one that shows locations of clouds and the other is just a ...
0
votes
0answers
26 views

Using GDAL and Python to replace the Spatial Analyst TabulateArea method

Has anyone tried to phase out the use of ESRI's Spatial Analyst extension by replacing it with GDAL in Python? I have a script that only uses the TabulateArea and Statistics analysis but not much else ...
1
vote
1answer
54 views

Script to “extract by mask” a list of raster files

I'm trying to mask a group of raster files and save the new rasters in a different folder using the same name of the original files. It doesn't sound as a difficult task, but I'm having trouble ...
0
votes
1answer
69 views

Weighted Overlay - passing parameter as text error?

For some reason when hardcoding the save path for the wieghted raster just before runtime it works perfectly. Like such... arcpy.env.cellSize = "90" arcpy.env.workspace = r'G:\Xcel\Route ...
3
votes
2answers
249 views

Multiprocessing issues with ArcPy

I am using ArcGIS 'watershed' routine in a script which makes use of multiprocessing. This works fine, but during execution I get the message: Unable to remove directory. Possible causes: 1- Not ...
0
votes
1answer
40 views

Add a field to output feature of a geoprocessing tool?

I am running the Watershed tool and RasterToPolygon tool in a loop for a number of points: flowdir = "flow.tif" flowacc = "flowacc.tif" pnts = [arcpy.PointGeometry(arcpy.Point(x=0.0, y=0.0, ID = ...
0
votes
1answer
59 views

Topo To Raster executing but not creating the raster

I am using Topo to Raster by File (ArcGIS version 10.1) via arcpy on a large stream and point dataset. Arcpy runs fine and executes without issuing any error message, however it does not create the ...
3
votes
1answer
370 views

Why does Raster Calculator (RasterCalculator_sa) give ERROR 000539 in ArcPy?

I am getting a not executed error for a raster calculator. Here is part of the output: File "C:\projectTemp\FloodAnalysis\floodxsectionanalysis.py", line 107, in makeSeemless ...
0
votes
1answer
278 views

NameError: name 'Con' is not defined

I have 365 rasters with the same extent, and I am trying to sum them together by month. I have the script below, which was working until I added the line out1 = Con(IsNull(raster), 0, raster) which is ...
1
vote
0answers
259 views

Why does CON statement give ERROR 010240: Could not save raster dataset to (value) with output format GRID?

I am receiving the following error when trying to run the following code: import arcpy from arcpy import env from arcpy.sa import * arcpy.CheckOutExtension = "Spatial" env.workspace = ...
3
votes
1answer
239 views

How to exclude stations from IDW interpolation?

I have the following problem: I need to calculate an average precipitation amount on a catchment using an IDW interpolation. The interpolation is performed in a loop since each precipitation station ...
2
votes
0answers
57 views

Copying an entire column between layers (tables)

I have a raster layer with probabilities as values and I process them using the Spatial Analyst extension. After the processing the values are modified, however I would like to also have the original ...
2
votes
1answer
424 views

Better way to get raster values for a large number of point features?

I have several projects with tree point features (SpecialStatusSpeciesPoint) that contain up to 2,000,000 records. I am trying to record tree height (Hgt) and base elevation (BaseElev) values, based ...
3
votes
2answers
250 views

scratch files left behind by arcpy.sa.Con

I have a Con() statement that creates two "extra" scratch files during it's processing, but that do not get cleaned up once the operation is over and the output is saved. r=arcpy.sa.Con(elv, ...
2
votes
0answers
119 views

Different results from Spatial Analyst GP Tool and Python

I am writing a script that has to subtract one raster from another. The rasters I have represent 1) Parking Lots (1 = Parking Lot, 0 = not Parking Lot) and 2) a buffer around the Parking Lot (1 = ...
1
vote
0answers
163 views

Problems running zonal statistics - not all zones represented

I have been working on a Python script to automate the steps illustrated by whuber here:Create points around the edge of viewshed results I am trying to create a horizon graph illustrating the ...
3
votes
1answer
387 views

Why is my simple arcpy script failing? (sets raster cell value to null if below threshold value, ArcGIS 10.1)

As mentioned in the title, simple script to set null cell values below three standard deviations beyond the mean: import arcpy, sys, os #Accept input and output raster inRas = sys.argv[1] outRas = ...
5
votes
2answers
202 views

Is there a way to increase the search radius of nearest neighbors for the Nibble tool?

I am working with a raster map vegetation types. I have about 20 types with unique raster code values that can be sorted into three classes: 1 - vegetation types I want to expand using the nibble ...
3
votes
0answers
48 views

arcpy adding time to Raster Mosiac Footprint

I am trying to create a raster mosiac for use in animating data over time. The current workflow is: Create .gdb (arcpy.CreateFileGDB_management) Create Raster Mosaic ...
4
votes
1answer
1k views

ArcGIS 10.1 ERROR 000824: The tool is not licensed in arcpy

I try to run the Zonal Statistic as a Table through arcpy and it gives me: ERROR 000824: The tool is not licensed. Here is the doc for the function: ...
2
votes
4answers
332 views

Error When Trying to Run Slope Analysis Script

I have written a script which is supposed to loop through all the rasters in a folder and perform a slope analysis on each raster and save the results in another folder. I keep getting the following ...
4
votes
4answers
190 views

How to determine if all points on a map are identical in arcpy?

My eventual goal is to automate kernel density calculations for a large corpus of point data; however, if all points are identical (for example, if there are 7 points all stacked on top of one another ...
1
vote
1answer
86 views

sa.fill creates NoData raster in standalone script ArcMap 10.0

I am trying to put together a geoprocessing workflow in Python, and I've hit a stumbling block with sa.fill. When run as a standalone script, the tool produces a raster composed entirely of NoData ...
6
votes
1answer
281 views

Why does tool take longer to run when in Python script?

I have written a python script that does some euclidean allocation. For that I use arcpy.gp.EucAllocation_sa() method. Now, my python script takes 30-40% extra time than spatial analyst euclidean ...
1
vote
1answer
123 views

Substitute for SpatialJoin tool?

I have to write a script in Arcgis which I would like to use the SpatialJoin tool (arcpy) but I do not have the appropriate extension. It may be a tool (or example of scripts) for doing the same ...
17
votes
6answers
6k views

Ways to Speed Up Python Scripts Running As ArcGIS Tools

This is a pretty general question. I just wondering what tips and tricks GIS programmers have used to speed up arcpy scripts that you import into the toolbox and run. I work most everyday writing ...
1
vote
2answers
622 views

arcpy.sa.Viewshed with OFFSETA

This is using ArcGIS10 arcpy with spatial analyst. I need to call Viewshed, but with an observer height set. I have tried using a Z-aware point feature set, but that only throws an error. I am ...
3
votes
1answer
590 views

Strange Behavior in Focal Statistics

I am trying to calculate the maximum value in a neighborhood on a raster using the Focal Statistics tool for Spatial Analyst in ArcGIS 10. Using python, I loop though several different radii, with ...
2
votes
1answer
401 views

How can you make RasterToASCII_conversion observe environment setting 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
0answers
553 views

Spatial Analyst Cell Statistics seems to give the wrong answer in ArcGIS 10.0

I have a script that calculates standard deviation for a list of grids using the Cell Statistics function in Spatial Analyst for ArcGIS 10.0 The syntax is this: stdevGrid = ...
4
votes
1answer
5k views

Thiessen Polygon delineation within a Feature

I am trying to create Thiessen (Voronoi) polygons, based on points within a defined shapefile extent. The output should be inclusive to the feature. The output I receive now is the rectangular area ...
7
votes
2answers
820 views

Process a raster with multiple geoprocessing tools in arcgis 10 using python - flow between processes

I'm writing a short python script that includes processing rasters with different geoprocessing tools in ArcGis 10, for example, the three processes below, is this best way to use multiple tools ...