outputformat and default image format output
Frank Warmerdam
warmerdam at POBOX.COM
Wed Nov 17 09:26:57 PST 2004
Kralidis,Tom [Burlington] wrote:
> Hi,
>
> In my mapfile, I've defined:
>
> OUTPUTFORMAT
> NAME GEOTIFF_RGB
> DRIVER "GDAL/GTiff"
> MIMETYPE "image/tiff"
> IMAGEMODE RGB
> EXTENSION "tif"
> END
>
> ...for some raster data, which is fine. However, it seems to have taken
> over my app/service as the default format. i.e. if I request:
>
> http://host/url?mode=legend&layers=roadlayer
>
> ..this gives me back a prompt to download a TIFF image.
>
> If I comment out the OUTPUTFORMAT object, I get back a GIF image, which
> is web friendly.
>
> Any ideas on how to define OUTPUTFORMAT and making sure a web friendly
> format is returned on requests?
Tom,
Use the IMAGETYPE keyword in the map object to select the default format.
If you don't the first user defined outputformat is used by default. If there
are no user defined output formats, the first built-in format will be used.
So adding "IMAGETYPE GIF" should do the trick.
Of course, I think all web browsers should have built-in GeoTIFF support but
I may have a biased point of view.
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