Bbox in GetCapabilies for PostGIS layer

Barend K ö bben kobben at ITC.NL
Fri Oct 26 09:17:45 EDT 2007


Hi Daniel,

> The service extent is simply using the mapfile's EXTENT values. It is
> not derived automatically from the data layers.

OK, understood. 
 
> Now I wonder if the OGC WMS spec states anywhere that any given layer
> extent must be a subset of the overall service extent. i.e. is it
> acceptable in WMS terms for a layer at the second level or deeper in the
> layer hierarchy of the capabilities to advertise an extent that is
> larger than the extent of its parent layer(s)?
The spec  doesn't state anything on that. It could be certainly the case for
BoundingBox, as these are there for every SRS supported by the layer. A
child layer CAN in theory support an SRS that different from the parent
layer's SRS, so could be quite different. For LatLonBoundingBox it's
unlikely. 
 
> In theory I agree that it would be desirable to have all layers fit
> within the extent of their parent(s), but in practice this may be hard
> to enforce, especially when dealing with BoundingBox elements in
> multiple SRS where the projected/rotated BBOX corners will hardly ever
> fit within the parent layer extent.
I actually do not think it is desirable. Only when clients use the Parent
BBOX for something like "zoom full extent", it might turn out to be
confusing if one of the child layers doesn't fit.

But it IS desirable, or rather of utmost importance  that the child LAYER
SRS is either inherited or correct in it's own right, because most clients
use that to do a "zoom to layer" and if there's only one layer also a "zoom
to full extent", which in most cases is the starting state fro the map. The
current situation is very confusing fro users, eg . if you  load the URL
http://geoserver.itc.nl/cgi-bin/mapserv.exe?map=D:/Inetpub/geoserver/mapserv
er/pg_config_error.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities
into uDig, you'll never see the map as it zooms out to the LatLon floatmin,
floatmin, floatMax, floatMax, which is practically the whole universe...

> I'd suggest that you file a ticket about this.
Can you point me to the place where I can do such a thing...?

> I am not sure how easy
> that will be to fix, since we'll need a way to tell the capabilities
> generation code that the extent returned by Postgis is not meaningful.
My suggestion is that the error is in the way you ask the data/extent from
PostGIS. PostGIS in it's own right is perfectly capable of providing a
correct extent :  SELECT extent(the_geom) FROM test, if you need the
LatlonBBOX: SELECT transform( extent(the_geom),4326) FROM test. How is
MapServer requesting the bbox at the moment...?

Yours,
__ 
Barend Köbben
International Institute for Geo-information
Sciences and Earth Observation (ITC)
PO Box 6, 7500AA Enschede (The Netherlands)
ph: +31 (0)53 4874253; fax: +31 (0)53 4874335



More information about the mapserver-users mailing list