Tagged Questions
1
vote
1answer
46 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 ...
5
votes
1answer
282 views
How to keep spatial reference using arcpy.RasterToNumPyArray?
I am using ArcGIS 10.1, and want to create a new raster based on two preexisting rasters. The RasterToNumPyArray has a good example which I want to adapt.
import arcpy
import numpy
myArray = ...
10
votes
3answers
856 views
Writing numpy array to raster file
I'm new to GIS, and I'm lost with something I feel ought to be relatively simple. I have some code that converts infrared images of Mars into thermal inertia maps, which are then stored as 2D numpy ...
6
votes
2answers
758 views
How to fully load a raster into a numpy array?
I have been trying to check my filters on DEM raster for pattern recognition and it is always resulting in missing last rows and columns(like..20).
I have tried with PIL library, image load. Then with ...
5
votes
2answers
232 views
Adding noise to a raster
I want to add some fine-grained noise to a raster in an automated python process (i.e. I do not want to use Photoshop or GIMP). I looked at PIL, but unless I'm mistaken, it doesn't seem to have any ...
1
vote
0answers
217 views
ValueError when reading a raster band as a numpy array
Here's the problem shown in Python shell:
In [32]: from osgeo import gdal
In [33]: geotiff = '/Users/calvin/work/luc/proj_public/media/GLO
...
1
vote
1answer
277 views
Calculating beta-diversity w raster data [renamed]
Using ArcGIS 10, it is not possible to generate a raster attribute table for 32-bit float values. Instead, I have tried the RasterToNumPyArray method, which crashes since the file input raster is so ...
