[mapserver-users] WMS BBOX tolerance out of this world?
Daniel Morissette
dmorissette at mapgears.com
Tue Feb 9 07:30:39 PST 2010
Charlton Galvarino wrote:
>
> My question is, does the WMS server need to support queries outside of these bounds? E.g. for a dataset advertised as 4326 w/ bounds -180,-90,180,90, if the user requests -198,-99,198,99, should the user get the 'data' image surrounded by white space or get an error that says 'sorry, that was something I don't understand'? A GetCaps can advertise the BBOX for the site and each layer, but I'm still asking about these exceptional cases.
>
> I dug around and found that both ESRI and MapServer WMS servers support these queries just fine. But are they being nice, or does the WMS spec say that these are valid queries and that the servers should support them?
>
My interpretation of the spec is that it is okay to return white space
and those cases. Here is what WMS 1.1.1 section 6.5.6 says about this:
"""
If a request contains a Bounding Box whose area does not overlap at all
with the BoundingBox advertised in the Capabilities XML for the
requested geodata object, the server should return empty content (e.g.,
a blank map, empty coverage file, null feature set) for that element.
Any elements that are partly or entirely contained in the Bounding Box
should be returned in the appropriate format.
"""
Later in the text, they open the door to an (optional) exception to the
above rule for maps crossing the date line (+/- 180 degrees longitude),
in which case a server could choose to support requests such as
lon=120,250 to cover the Pacific Ocean for instance.
However I don't think this changes the answer to your question, i.e. it
is okay for a client to request maps whose bbox does not fit strictly
inside the advertized layer bounds, and in this case the client should
expect some white space around the data.
Daniel
--
Daniel Morissette
http://www.mapgears.com/
More information about the MapServer-users
mailing list