[mapserver-users] Export geotiff Mapserver

Frank Warmerdam warmerdam at pobox.com
Thu Aug 6 10:41:18 EDT 2009


djutopie wrote:
> Hello everyone,
> 
> I'm trying to export a map with geotiff layers but when
> i'm doing it the geotiff file doesn't keep tags and
> real values of the geotiff..
> 
> Is there a way to do it right?
> 
> My code before to export (mapscript php) :
> 
>         $map->outputformat->set("driver","GDAL/GTIFF");
>         $map->outputformat->set("imagemode","BYTE");
>         $map->outputformat->set("mimetype","image/tiff");
>         $map->outputformat->set("extension","tif");
> 
> Thanks ;)

Djutopie,

In C the msSaveImage() function includes a "mapObj" argument that may
be NULL.  It is necessary to pass in the map in order for SaveImage to
write georeferencing information to a geotiff file.  So the issue isn't
so much the outputformat setup (which looks fine) as it is how SaveImage
is called.  I'm uncertain if the map argument can be passed from PHP mapscript
or not.

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