Raster Analysis and MapServer

Frank Warmerdam warmerdam at POBOX.COM
Tue Dec 20 11:36:07 EST 2005


On 12/20/05, Ari Jolma <ari.jolma at tkk.fi> wrote:
> Fischer, Brian wrote:
> >
> > 3. Some tool would do a raster calculation (raster1 minus raster2) to
> > produce a final raster
>
> The software which I work on from time to time is Geo::Raster. The
> current version uses GDAL for accessing the data, a C library for the
> raster calculations (libral), and the main interface is a Perl module
> which overloads arithmetical functions and some others for raster
> objects (so you can easily write for example $c = $a + $b, where $a and
> possibly $b are rasters). The homepage is libral.sf.net (the version in
> CPAN is not the most recent)
>
> I haven't used this with mapserver so I don't know how it would
> integrate with its mapscript. I have used Geo::Raster with some web apps
> though.

Ari,

Is there any way of treating an inmemory Geo::Raster image as
a GDAL dataset?  In python I have a special hack that allows
a Python Numeric image array to be treated as a GDAL dataset.
While I have never tried it, this would in theory allow one to write
an application that is a mixture of Python MapScript and Numeric
Python and use the image arrays resulting from Numeric Python
directly in a map without writing it to disk.

It would be neat if something similar could be done with the Geo::Raster
in memory images.

I certainly think that the solution for Brians original query is
to use mapscript (of some flavor) and integrate with an existing
raster modelling environment (ie. GRASS, Geo::Raster, or Python
Numeric).   I don't think it makes sense to try and build alot of
raster modelling directly into MapServer (or GDAL).

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list