[Mapserver-users] WMS Problems...

Steve Lime steve.lime at dnr.state.mn.us
Wed Mar 3 09:50:17 PST 2004


Note that the MapServer version is 4.1 (a week or two old) and not 4.0.

Anyway, I've created 2 stripped down versions of the mapfile. One with
output formats:

 OUTPUTFORMAT
    NAME geotiff_24bit
    MIMETYPE "image/tiff"
    DRIVER "GDAL/GTiff"
    IMAGEMODE RGB
  END

  OUTPUTFORMAT
    NAME geotiff_8bit
    MIMETYPE "image/tiff"
    DRIVER "GDAL/GTiff"
    IMAGEMODE PC256
  END

and one without. Here are the links to the capabilties (switch to your
favorite version):

http://maps.dnr.state.mn.us/cgi-bin/mapserv40?map=/usr/local/www/docs/deli/mapserver/wms_test_outputformat.map&version=1.0.0&request=GetCapabilities

http://maps.dnr.state.mn.us/cgi-bin/mapserv40?map=/usr/local/www/docs/deli/mapserver/wms_test_no_outputformat.map&version=1.0.0&request=GetCapabilities

With WMS 1.0.0 tiff never shows up as an output format. With WMS 1.1.x
tiff is always always there.

Here are GetMap URLs against the two mapfiles:

http://maps.dnr.state.mn.us/cgi-bin/mapserv40?map=/usr/local/www/docs/deli/mapserver/wms_test_outputformat.map&version=1.1.0&request=GetMap&layers=L380000020906&exceptions=inimage&format=tiff&width=500&height=500

http://maps.dnr.state.mn.us/cgi-bin/mapserv40?map=/usr/local/www/docs/deli/mapserver/wms_test_no_outputformat.map&version=1.1.0&request=GetMap&layers=L380000020906&exceptions=inimage&format=tiff&width=500&height=500

In the first example an image is created. The second example generates
an exception. What's also interesting is that if you switch to WMS 1.0.0
and hit the mapfile with OUTPUTFORMAT definitions you can create a tiff
even though the capabilities document doesn't list the format.

I was under the impression that there was some connection between
OUTPUTFORMAT and WMS supported formats, or at least is seems like there
should be.

Steve

>>> Frank Warmerdam <warmerdam at pobox.com> 3/2/2004 9:13:39 PM >>>
Steve Lime wrote:
> Hi Folks: I'm running into a few WMS issues that perhaps others have
> witnessed (this is all MapServer 4.0, w/GDAL and Proj):
> 
> - In a GetCapabilties request (version 1.1.1) tiff is showing up as
an
> output format even though a tiff output format is not set. GetMap
> requests wanting tiff output subsequently fail. Seems to work (I get
a
> file and not an error) if I add a tiff output format. For some reason
I
> thought there was a default tiff format but if so it ain't working.

Steve,

I would assume the TIFF that is showing up is from GDAL.  I don't know
why
the built-in GDAL/GTiff output format definition wouldn't work the
same
as one you define yourself.  Can you produce a smallish example to
demonstrate
the problem?

> - In a GetCapabilties request (version 1.0.0) I can't seem to extend
> the list of output formats by defining more of them in the map file.
I
> always and up with the 4 standard GD formats, but at least tiff
ain't
> there. ;-)

What kinds of OUTPUTFORMAT definition are you using that isn't showing
up?

> - 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?

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

_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu 
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users



More information about the MapServer-users mailing list