0
votes
1answer
29 views

Clip a shapefile based on raster extent with high accuracy

I am trying to clip a shapefile based on the extents of a smaller raster. I find the extent of the raster using this code: Extents = arcpy.sa.Raster(MyRaster).extent` Then, I use these lines to ...
2
votes
3answers
119 views

raster area calculation using python script

Hi I am a beginner to python programming in GIS and am trying to calculate the area of a raster. When I ran the program, I got error message below. I am also providing my code. Any help would be ...
0
votes
1answer
38 views

Arcpy Subtracting rasters error - TypeError: 'unicode' object is not callable

I have a script which subtracts 2 versions of the same raster from each other (one newer than the other) and then extracts the additions & deletions that have happened. I created a simple test ...
2
votes
1answer
222 views

How to change value of an individual pixel using arcpy?

I want to change the value of an individual pixel in a raster using arcpy. The code I wrote for changing the value is below, but it changes all of pixels in my raster. How can I set an individual ...
0
votes
1answer
36 views

Script never finishes and throws no errors. Creates lock on file until restart?

I have a simple script that gets all layers in a gdb and uses them to clip a DEM. What's happening though is it starts the clipping but never finishes and after killing the process I am unable to ...
-2
votes
0answers
30 views

Error 0100060 while running Extract by Points? [closed]

The resources have not been much help here. I can run this same process hardcoded in the IDE, however through the tool dialogue it gives the following error? Any thoughts? ExecuteError: ERROR ...
0
votes
1answer
42 views

Selecting raster data by location: for raster and feature class data

I have rasters covering certain spots in my environment, I'm looking for a way to extract the values which occur at locations which are defined by a selection of feature layers. I've tried with the ...
0
votes
0answers
40 views

Arcpy raster calculation producing random no data cell in output

I've been trying to get the raster calculation below to work using python: import arcpy from arcpy import env import os from arcpy.sa import * arcpy.CheckOutExtension("spatial") KSat_mm = ...
2
votes
1answer
37 views

Export Stretch Function values - Arcpy

I'm looking for a way to export Stretch Function values from images that’s stored in a Mosaic dataset. Not values from the whole set, but specific stretch functions per image. The set is stored in ...
0
votes
1answer
73 views

Iterative raster calculation script using NumPy arrays breaks after ~10 rasters, returns: “TypeError: Cannot create raster for numpy array.”

Here is my code: #Generate Cumulative Thresholds #5/15/14 import os import glob import arcpy import numpy as np #Enable overwriting output data arcpy.env.overwriteOutput = True ...
1
vote
1answer
65 views

Raster calculation in for loop returning exit code -1

I've put together a python script that does some calculations on rasters by converting them to NumPy arrays, doing the math, then converting them back to Raster and applying all the same spatial ...
2
votes
2answers
113 views

Nested loops for raster calculation arcpy

I am trying to figure out a way to input corresponding raster datasets from two separate folders into an equation using arcpy. I think it requires some sort of nested loop but I can't figure out how ...
0
votes
1answer
92 views

How to compare two rasters and reclass the greater value(python script)?

I am working on an assignment that requires us to reclass a raster(via python) from two rasters. We need to compare the power received at one cell(on raster1) and compare it to the same cell on raster ...
-1
votes
1answer
52 views

Raster Calculator Workaround in Arcpy for Suitabiliy Analysis

This is my first attempt at a complex stand alone python code. I am self teaching the arcpy module, well at least attempting to. I am having a great deal of difficulty getting my site suitability ...
4
votes
1answer
78 views

How to automatically check for lidar flight line overlaps?

I have a series of lidar-based raster products created via FUSION. Since I am working with low density lidar data, many of the raster images show significant striping where lidar returns overlap on ...
3
votes
1answer
47 views

Why is Mosaic or Mosaic To New Image causing a 1-pixel gap between adjacent images?

I have a series of adjacent PNG images, and I'm trying to merge/mosaic them into a single seamless image. The images have clean "cuts" between them, with no overlaps. However, when I use either the ...
0
votes
2answers
78 views

Find the minimum elevation pixels from an elevation raster using arcpy

I want to create a python script to find the minimum elevation pixels from an elevation raster (aster,srtm) using arcpy and arcmap 10.1. The purpose is to reclassify these pixels. I have tried but I ...
0
votes
0answers
34 views

Error building pyramids/statistics on raster with arcpy

I am building a script to process rasters with the option of adding the extra step of building pyramids and statistics at the end. For some reason, it will not recognize inputs as legitimate raster ...
2
votes
2answers
58 views

Update raster value to reflect total number of points within cell- python

I have what should be a fairly simple task, but I can't seem to figure out how to do it. I have to do it in python/arcpy/gdal/whatever because I'm trying to automate this process for a hundred or so ...
3
votes
1answer
44 views

How to obtain the width and height of an image using arcpy

This Stack Overflow question shows how to obtain the pixel dimensions of an image using Python. Is it possible to find an image's height and width using arcpy and ArcGIS? arcpy.Describe would seem ...
2
votes
2answers
82 views

raster standard deviation stretch python script

I am looking for ways of applying a permanent standard deviation stretch to rasters via python script. Are there any arcpy raster stretch functions? I was looking for a reference but could not find ...
2
votes
1answer
74 views

Find maximum and minimum value in a list of raster

I trying to write a standardisation script that standardises each raster dataset in a list of rasters by the highest and lowest values found in the list of rasters. The standardisation code is as ...
2
votes
1answer
80 views

Map algebra for loop

I have never coded in Python before and I am trying to loop a simple map algebra equation across 365 rasters. I am trying to calculate total water flow over cells but in the raster I have a negative ...
0
votes
0answers
54 views

How to extract raster using corresponding polygon using ArcPy?

I have to perform a simple raster extraction, but I can't find the way to do it. In a polygon layer, I have watersheds with their ID's. And in a folder, I have rasters, each one corresponding to a ...
0
votes
0answers
31 views

problem saving GRID to .img keeping original names (export by attributes)

I am really new in Python programming. I try to make a loop for Extract by Attributes tool in ArcGIS 10.1. I have a huge dataset of raster (760pc) and I want to extract a specific value. This part of ...
0
votes
2answers
48 views

Arcpy GetRasterProperties returns odd results

I have this simple piece of python code to test whether a raster has integer values or not: res = arcpy.GetRasterProperties_management(ws, 'VALUETYPE') res = res.getOutput(0) ...
2
votes
0answers
37 views

Create custom raster pyramid using arcpy in ArcGIS 10.2

I have a arcpy script that runs the Point Density tool several times for the same extent, using the same number of neighborhood cells, but with cell size increasing at an multiple of 2 with each pass. ...
1
vote
1answer
148 views

Multiply a raster list with a field value list in a FOR loop in ArcPy

I'm trying to create a simple map algebra calculation not managed by ModelBuilder, but writing it in Python is trickier than I thought. I have a list of raster in a GDB and I must multiply them by ...
16
votes
5answers
576 views

How to buffer raster pixels by their values?

The pixels to the left represent tree locations and their associated crown radii (i.e. pixel values ranging from 2 - 5). I would like to buffer these raster pixels by their crown radius value. The ...
1
vote
1answer
93 views

ListRasters not recognizing raster files in python

I have 2 rasters in my workspace, one in TIFF Format and the other in GRID format: "C:\ExampleFolder" When I use the python script: import arcpy >>> ...
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 ...
2
votes
0answers
36 views

Extract MultiValuesToPoints yields identical value for each band

I'm attempting to extract hyperspectral remote sensing data to a point featureclass using the ExtractMultiValuesToPoints ArcGIS tool. The value of each band (228 bands) should be appended as a field ...
7
votes
2answers
198 views

Finding specific pixel values ​​in ArcGIS using Python

I have a raster file containing some integer values. I need to find all pixels whose values are not defined in list like this one: l = [1,2,4,8,16,32,64,128]. Is there any easy way to solve that ...
3
votes
2answers
160 views

Using python to Raster clip the extent to be the same as the display?

I've been trying to figure this out for almost a week now. I am creating a tool which first needs the raster to be clipped out to the current display. I have tried all sorts of things. Below is the ...
9
votes
4answers
187 views

How to determine if point is surrounded using raster processing?

I am attempting to improve a currently extremely cumbersome vector/python process for a natural hazard model. At the moment we have a lengthy script which generates distance/bearing lines from a given ...
0
votes
0answers
66 views

recording pixel value with Python script in ArcGIS 10.x

A scripting newbie question... I'd like to write a Python script for ArcGIS 10.x that would record the pixel value for all pixels in a raster. Furthermore, I'd like to only record a given value once ...
0
votes
0answers
37 views

recording pixel value with Python script in ArcGIS 10.x

A scripting newbie question... I'd like to write a Python script for ArcGIS 10.x that would record the pixel value for all pixels in a raster. Furthermore, I'd like to only record a given value once ...
1
vote
2answers
103 views

Copy rasters slow, increases file size

I have a folder with ~1200 aerial photos in both jp2 and tif format, of which I need about 380. I wrote a python script to get the names of the files I need, which works fine. But when the script ...
5
votes
1answer
124 views

Is there a way to find out which pixel values are around the current pixel?

I would like to write a cycle which takes a current pixel, look at the surrounding pixels, choose the pixel with max/min value and skip to that pixel...and so on. Is there in arcpy such a function ...
2
votes
1answer
107 views

Arcpy.GetRasterProperties_management values do not match values found via ArcCatalog or ArcView

I am using Arcpy to extract the mean and standard deviation values of tiff Landsat satellite images and I get very high values. Values in the thousands rather than in the low hundreds! If I look at ...
1
vote
0answers
252 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 = ...
2
votes
1answer
515 views

ArcPy findAndReplaceWorkspacePath not working with Raster Datasets

Situation: I am working on creating a Python script that will replace workspace paths for every layer in a map document in order to fix broken layers after a data migration. The script works except ...
1
vote
1answer
137 views

“dataset does not exist or is not supported” using large GRID raster

I am trying my hand at arcpy for the first time to create a conditional raster from a set of threshold values. I have 3 large GRID format rasters (mos_zb3, mos_zb4, pca_finb2) I am trying to feed into ...
2
votes
0answers
193 views

Finding coordinates from a nested grid as a numpy array

So this is a pretty basic question, but I'm trying to figure it out. I've written a script that allows a user to read in a raster and provide a cell resolution, and outputs the amount of cells ...
3
votes
1answer
171 views

Selecting raster values at random locations in a raster in python/arcgis

I have a large dataset of integer rasters, and was hoping to find a way to generate a "random" selection of pixels for four of the rasters, while making sure all 5 classes, which I've specified based ...
2
votes
0answers
111 views

python.multiprocessing and “FATAL ERROR (INFADI) MISSING DIRECTORY”

I have a question which is closely related to this old question here: python.multiprocessing and "FATAL ERROR (INFADI) MISSING DIRECTORY" I have also looked at this, which seems to relate ...
0
votes
0answers
60 views

Using arcpy.GetRasterProperties_management gives strange results

I have a loop which goes through folders and do some raster operations. Inside this loop I checked for a raster properties using arcpy.GetRasterProperties_management with NODATA parameter. And then ...
0
votes
0answers
74 views

Compare cell value of a row

How can I compare the cell value of row(n) with cell value of row (n+1){where n = 1, 2, ...} import arcpy arcpy.env.workspace = "C:\RG\Kings County\Test.gdb" inFC = arcpy.GetParameterAsText(0) inFC ...
0
votes
1answer
156 views

Problem with converting rasters to arrays and adding them to main array, then converting to raster via NumPyArrayToRaster : output is NoData values

I have a process that aims to loop through a list of rasters (testing with only 3) covert each raster to an array, add the array to an existing 'template' array, then save the final array back to a ...
1
vote
1answer
173 views

Read layer symbology class color with ArcPy

I am using ArcPy within ArcGIS 10.1 and attempting to read symbology from a *.lyr file created by a raster dataset within ArcMap. My goal is to be able read out the RGB (color) values assigned to the ...