Raster Analysis and MapServer

Ari Jolma ari.jolma at TKK.FI
Tue Dec 20 13:51:21 EST 2005


Frank Warmerdam kirjoitti:

>Is there any way of treating an inmemory Geo::Raster image as
>a GDAL dataset?  
>

The way it works now is a bit, well, maybe more than a bit, hackish. In 
libral I have a C function to get a rectangle from GDAL (using 
GDALRasterIO) into a libral data, and that's all. It's one way street 
currently. In libral there's a function to write the data into a .bil file.

Geo::Raster image (actually, an integer or real raster) is in the libral 
C struct and has to be accessed from Perl through the Perl/C interface.

>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.
>  
>

How is a raster (or for that matter a vector) dataset handled in (Perl) 
mapscript? The Perl examples are a bit limited on mapserver website ;-)

I think the link could/should be done in C from libral to mapserver and 
vice versa.

>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).
>  
>

I'm probably getting more involved with using mapserver with a project 
we have -- or will have, the exact nature of it is still to be figured 
out. That should give me an opportunity to learn mapserver more and work 
out the link between it and libral.

Ari

>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
>  
>


-- 
Prof. Ari Jolma
Kartografia ja Geoinformatiikka / Cartography and Geoinformatics
Teknillinen Korkeakoulu / Helsinki University of Technology
POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma



More information about the mapserver-users mailing list