1
vote
1answer
32 views

gdal_proximity distance to meters

I followed the answer given in this topic for searching the distance to the nearest coastline given a lat/lon coordinate. The distance output obtained is in degree (I think) but I need the distance ...
1
vote
1answer
60 views

How to calculate monthly maxium values from daily data in a 365 band grd?

I have a MINT2005.grd file which has 365 bands representing days of year from 2005. Each band is a 32x35 matrix representing the temperature at different latitude and longitude pair. How do I ...
0
votes
0answers
42 views

Import GRD and count days with temperature below zero, using python

Minimum temperature of a year is given in GRD file. I have to read that file and then calculate the frost day (less than zero degrees celcius) from it in python.
3
votes
2answers
108 views

Memory and Processing Efficient Approach to Read a Timeseries in Python

I am trying to store a timeseries of high resolution raster images containing NDVI values into a dictionary for calculations. I am curious as to which approach may the most efficient when loading ...
0
votes
0answers
71 views

No data appears when using gdal_calc.py but source had data values

I'm in the process of calculating topographic exposure using a mix of GDAL, grass, R and python in Windows. I need to process a very large tiff file using the following calculation: ...
1
vote
1answer
259 views

Convert polygons in shape file to a numpy array?

I have a shape file containing a number of polygons and all attributes being text. I'm trying to import the polygons into numpy as an array where each polygon is represented as unique values. I ...
1
vote
0answers
92 views

Efficient computation of path profile with Numpy and GDAL

I have numpy array with SRTM elevation data and I need calculate path profiles - vectors with elevation data from one point (transmitter) to every points of my map. Here's my current solution: def ...
2
votes
0answers
57 views

Tabulate Area using GDAL and Numpy

How could I perform a Tabulate Area using GDAL and Numpy? I am trying to summarize how many pixels of each class in a Landcover raster are within each polygon of a Census Blocks shapefile. I've ...
2
votes
0answers
180 views

Buffering a Raster with GDAL and Numpy

I am using GDAL to convert a raster dataset into a numpy.array and then using numpy to buffer the data in the raster. For example, I need to know all the regions within 100ft of a school point ...
1
vote
0answers
130 views

How to create multi-image single band single file geotiff?

I have a geotiff file that is single band but contains multiple subdatasets. I use gdal with numpy to open a specific subdataset and mask some of its values. Example: $ gdalinfo sample.tif ... ...
0
votes
1answer
907 views

Display a georeferenced DEM surface in 3D matplotlib

I want to use a DEM file to generate a simulated terrain surface using matplotlib. But I do not know how to georeference the raster coordinates to a given CRS. Nor do I know how to express the ...
5
votes
1answer
454 views

Subsetting GeoTIFF with Python

I'm sub-setting a GeoTIFF with the GDAL Python binding and numpy. Essentially, I am providing a central location (coordinates of a flux tower) from which I produce a subsetted image. I then want to ...
10
votes
3answers
1k views

Gdal Dataset.ReadAsArray() crashes Python

I am using Python 2.6.5 (32bit) with Numpy 1.3 and Gdal 1.9.1 installed on Windows 7 64bit. I am trying to read an 800 MB Imagine (.img) raster dataset into a Numpy array to do some raster algebra, ...
1
vote
1answer
104 views

keeping the coordinate system of raster files in the resulting raster file after operation with numpy

I'm trying to read as array two raster files using ReadAsArray in GDAL/python, perform some map algebra operation on it using numpy and then write the resulting raster file in GTiff format using ...
11
votes
3answers
3k 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 ...
2
votes
0answers
236 views

How do I use scipy.ndimage.gaussian_filter1d on an arbitrary axis?

I have a GDAL raster that looks like this: And I would really like to blur this raster along an arbitrary transect. I see that scipy.ndimage has a gaussian filter that allows me to blur the raster ...
7
votes
2answers
3k 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 ...
4
votes
1answer
404 views

raster algebra in python with rasters of different extents

I am trying to find out how to use GDAL & numpy modules to average a set of rasters....which are Sigma0 values from satellite passes at different times within a year. Each raster has been ...
5
votes
2answers
401 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
293 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 ...