[Mapserver-users] WMS Problems...

Jeff Hoffmann jeff at propertykey.com
Tue Mar 2 22:57:08 EST 2004


On Mar 2, 2004, at 9:13 PM, Frank Warmerdam wrote:
>> - How would one advertise the ability to create DIFFERENT tiff 
>> formats?
>> (e.g. 8-bit vs. 24-bit) For many databsets it makes sense to use one 
>> or
>> the other. I've tried creating 2 output formats but that doesn't seem 
>> to
>> have any effect, nor can I or a user choose one.
>
> Good question.  As things stand you could have several output format
> definitions using the GeoTIFF driver, but with different names.  As
> things stand I think the WMS server code allows formats to be selected
> by mime type (first matching ... formats declared in the .map file take
> precidence over implicit definitions) or by the output format name.  
> However,
> I think (not so sure on this point) that only the mime types are listed
> in the capabilities document, so variations on the same format aren't 
> going
> to be visible externally.
>
> It seems to me there is some way of adding options to mime types.  
> Perhaps
> we could have something like a mime type of "image/tiff+24bit" or 
> something.
> Anyone know more about this?

I believe that the way to do this is to put parameters after the mime 
type like "image/tiff; color-depth=8".  I don't know if there are 
standards for what these parameters are, especially for different image 
types, but it's done for different character sets in HTTP requests.  
You should be able to put this info both in the Accept header for the 
request and the Content-type for the returned image.  I'd assume you'd 
be able to put the same in the format list when you do a "get 
capabilities" (i.e., <Format>image/tiff; color-depth=8</Format>).  I 
have _no idea_ if anything would choke on this or not, but I think it'd 
be worth some research.

--
Jeff Hoffmann
jeff at propertykey.com




More information about the mapserver-users mailing list