3
votes
1answer
25 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
42 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
15 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
32 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
41 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
51 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
32 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
61 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
39 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
19 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
38 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
24 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
76 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
480 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
60 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
42 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
32 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
181 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
61 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
146 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
34 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
34 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
78 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
91 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
99 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
154 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
285 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
96 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
166 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 ...
1
vote
0answers
95 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
55 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
66 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
114 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
151 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 ...
2
votes
0answers
53 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 ...
1
vote
2answers
267 views

Clip_management to raster extent outputs larger raster than raster extent

Using Python and ArcMap 10.0 SP5, I'm trying to reproject and clip a large input raster to exactly the same grid as a smaller target raster (same extent, pixel sizes and projection). The problem is ...
-1
votes
1answer
143 views

Raster produced by Con expression not saving

I cannot get a Con expression to work. Or, if it is working, I cannot get the raster produced by the Con expression to save. I have two rasters and I want the positive difference between the two, and ...
1
vote
0answers
283 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
1answer
579 views

Iterating through an numpy array and index to a value in another numpy array

I am struggling to get this code to work I want to iterate through an numpy array and based on the result, index to a value in another numpy array and then save that in a new position based on that ...
3
votes
1answer
182 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, ...
4
votes
1answer
131 views

How to implement multiprocessing with multiple geoprocesses?

I am relatively new to Python and thought I would give a stab at multiprocessing. I have a script that runs well in IDLE or as an ArcMap toolbox script. After perusing these forums and docs.python, I ...
0
votes
0answers
72 views

Copy Raster Catalog from .mdb to .gdb, but only within a certain extent with arcpy?

I am stumped again, this website has really helped me before so here is another shot. I am trying to copy a raster catalog from a personal geodatabase to a newly created file geodatabase but only ...
0
votes
2answers
211 views

How to write raster field values into attribute table using ArcPy?

Is it possible to use ArcPy (10 or 10.1 )to write raster field types into a featureclass? either SDE or filegeodatabase?. I'm hoping to use arcpy as means of automating the process of adding rasters ...
2
votes
1answer
421 views

Why does copy convert my Tiff raster value range?

Recently I have worked with some raster dataset. And I found there are different kind of raster dataset. Till now I have worked with grid type raster dataset and my add-in works fine with this type. ...
1
vote
1answer
195 views

mosaic raster to file geodatabase yields missing raster sections

Since upgrading to ArcGIS 10.1 (SP 1) from 10.0, I've been encountering an issue when running the arcpy.MosaicToNewRaster_management() tool with output to a file geodatabase. I'm principally working ...
2
votes
1answer
176 views

How to read XY, get raster value and then update field?

I've written a script to run through a point layer, using the SearchCursor in the data access module and then read the XY values. Within the with statement, I then use GetCellValue to get the ...
1
vote
1answer
105 views

Problem with calculating the total cell values

aa= arcpy.RasterToNumPyArray("water_depth") sum = numpy.sum(aa) print sum -2933737 Why I am getting negative values ? In my raster there is no any negative ...
2
votes
0answers
92 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 = ...
0
votes
2answers
215 views

Add a time dimension in ESRI mosaic raster dataset

I am in the process of creating a script to pull daily .asc files from a ftp server, convert them to a raster format, and push them into a mosaic raster dataset. Ultimately, the raster dataset will be ...
1
vote
2answers
567 views

What might cause invalid syntax from ArcPy with Raster Calculator and Multiple Rasters?

I am having trouble for writing script in Python (ArcGIS 10.1). The task is generally divide each raster by 100. I have many of these raster files.... So what I've done is the following: from ...