[Gdal-dev] Getting started with raster processing with GDAL/OGR
Matthew Perry
perrygeo at gmail.com
Sun Sep 9 21:49:17 EDT 2007
Roger,
On 9/9/07, Roger André <randre at gmail.com> wrote:
> 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.
I've got a "point density" script that you could take a look at. It
is pretty basic; given a raster extent and cell size, loops through
each cell, performs a spatial filter on the point dataset and writes
out the number of points encountered within that raster cell.
http://perrygeo.googlecode.com/svn/trunk/gis-bin/point_density.py
Note: it uses the "old" python bindings (with Numeric instead of
numpy) and I haven't tested it with the next-gen bindings.
Hopefully this will be of some use to you. Best of luck.
--
Matthew T. Perry
http://www.perrygeo.net
"You never change things by fighting the existing reality.
To change something, build a new model that makes
the existing model obsolete" - R. Buckminster Fuller
More information about the Gdal-dev
mailing list