PHP Mapscript and PHP image integration question

Martin van Dijken sunsear at GMAIL.COM
Wed Jan 16 05:37:23 PST 2008


For a project I'm currently working on, we're creating a density layer on a
mapfile. The same thing was once attempted by Bill Binko and his work is
currently being used as inspiration.

What we'd like to do is make a map containing (from bottom to top):

a raster layer
a semi transparent layer we calculate ourselves
a feature layer

The problem we encounter is how to combine the mapserver layers with the
layer we calculate in PHP. We're planning to calculate the layer using php
functions and then using php's image functions to create an overlay image.
This will give us a GD image in memory. What we can do, and Bill has already
done so, is to save the mapserver generated layers to the file system and
then reopening them using php's image functions and using php's image
functions to stack them onto each other and create a final image the client
can use.

The problem with this solution is that it's hardly elegant and requires
quite a bit of disk I/O that really isn't necessary and is therefore quite
slow. Is there some way we can use the imageObj in mapscript to paste the
in-memory calculated php GD image onto? Another solution would be to allow
imageObjs to be transformed into php image objects. Is there a way to do
such a thing?

Any help will be greatly appreciated

-- 
Martin van Dijken
Senior ontwikkelaar / Technisch projectleider

M +31 (0)6 26 144 223
E martin at van-dijken.eu

IPROFS
www.iprofs.nl

Gebouw "De Houthof"
Claus Sluterweg 125
2012 WS Haarlem

T +31 (0)23 547 6369
F +31 (0)23 547 6370
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080116/169e80a3/attachment.htm>


More information about the MapServer-users mailing list