[Gdal-dev] Getting started with raster processing with GDAL/OGR

Roger André randre at gmail.com
Sun Sep 9 19:53:21 EDT 2007


Hi All,

I'd like to start making some "heat maps" in raster format using the
Python API to GDAL/OGR.  In a nutshell, what I'd like to do is overlay
an empty raster grid (no intentional reference to the ESRI GRID
intended) over various point data sets and assign the grid cells
values based on the point data attributes.

The process I've worked out in my head for doing this is to create a
dictionary with some sort of raster cell id as a key, and the point
value of interest as the value.  Then to loop through each raster cell
and feed its extents as bounding-box values to OGR and capture any
points that fall within the b-box.

The problem is that I don't have any experience creating raster data,
so although I'm pretty confident I could process the point data by
creating the b-box coords mathematically, I don't know how to create
an output raster and assign values to each pixel.

Can someone recommend a tutorial, or previous posting that describes
how to create a raster set that covers a certain rectangular area, and
how to assign the pixels values?

Thanks,

Roger
--



More information about the Gdal-dev mailing list