[Gdal-dev] Getting started with raster processing with GDAL/OGR
Roger André
randre at gmail.com
Mon Sep 10 11:20:39 EDT 2007
Mathew, one quick question about your script.
You define "cellsize = 1", which I assume means one degree, given the
extents that are then defined afterwards. What logic would you
recommend for allowing the user to define an arbitrary cellsize in
kilometers?
Thanks,
Roger
--
On 9/10/07, Roger André <randre at gmail.com> wrote:
> Hi Ivan and Mathew,
>
> Thank you both for your responses. Ivan, I appreciate the simple
> description of how to assign values to raster cells. Mathew, your
> script is exactly what a colleague of mine needs to complete a project
> he's working on, and I believe I can follow what it does well enough
> to understand how I can adapt it for making my heat maps. Also, I
> wanted to thank you for the other examples of code that you've posted
> on PerryGeo. The "Tissot Indicatrix" page was what whetted my
> appetite initially to learn how to use OGR from within Python to do my
> own GIS processing.
>
> Thanks again,
>
> Roger
> --
>
> On 9/9/07, Matthew Perry <perrygeo at gmail.com> wrote:
> > 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