outputformat and default image format output

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Wed Nov 17 12:33:56 EST 2004


> -----Original Message-----
> From: Frank Warmerdam [mailto:warmerdam at pobox.com] 
> Sent: Wednesday, 17 November, 2004 12:27
> To: Kralidis,Tom [Burlington]
> Cc: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] outputformat and default 
> image format output
> 
> 
> 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.
> 

Works (I used PNG) -- thx.

> Of course, I think all web browsers should have built-in 
> GeoTIFF support but I may have a biased point of view.
>

I second that motion.
 
> 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