[mapserver-users] Best way to load image as a layer in mapscript

Trond Michelsen trondmm-mapserver+2017 at crusaders.no
Fri Nov 4 16:17:23 PDT 2016


Hi.

I'm using mapscript (perl), and I want to add an image as a layer. The
image will be prepared to have the exact extent and projection as the
request. At the moment, I'm basically creating a raster layerObj,
setting the data, projection and the extent, like this:

$layer->{data} = $tmpfile->filename;
$layer->setProjection($map->getProjection());
$layer->setExtent(@bbox);

but I'm wondering if there are better ways to do it. In particular,
I'm wondering if I can avoid writing the image to disk and reading it
back. 



BTW: This is not a static image. It's a proper geographical layer,
being generated based on the wms query. Today, it's wrapped in a wms
server, and Mapserver fetches the layers through a WMS request. I hope
to improve performance and reduce complexity, by moving this
processing to this new program.

-- 
Trond Michelsen



More information about the MapServer-users mailing list