WMS getcapabilities wrong BoundingBox for PostGIS layers

Havard Tveite havard.tveite at IKF.NLH.NO
Tue Nov 2 10:55:07 EST 2004


I found the 4.4 documentation, and the LAYER level
wms_extent parameter was what I was looking for.
Could perhaps also be useful to use the extent of a
(PostGIS) layer to determine when it is necessary to
access the data, and when it is not.

Havard Tveite
IMT, NLH

Håvard Tveite wrote:

> In 4.2.5 and 4.4 (todays nightly build), a WMS GetCapabilities request
> returns a strange BoundingBox (and LatLonBoundingBox) for PostGIS layers.
> For Shape format layers the correct BoundingBox is returned.
> My request uses: "&version=1.1.1&request=GetCapabilities"
>
> For my Shape format layers the following is returned (seemingly correct):
> <LatLonBoundingBox minx="-0.460251" miny="0" maxx="30.8616" maxy="70.9096"/>
> <BoundingBox SRS="EPSG:32633" minx="-77665" miny="0" maxx="1.0934e+06"
> maxy="7.86732e+06"/>
>
> For all my PostGIS layers the following is returned:
> <LatLonBoundingBox minx="-171.507" miny="-8.2419e+12" maxx="179.211"
> maxy="8.2419e+12"/>
> <BoundingBox SRS="EPSG:32633" minx="-2.5e+07" miny="-2.5e+07" maxx="2.5e+07"
> maxy="2.5e+07"/>
>
> Is this expected behaviour?
>
> In geometry_colums, the srid is 32633 and all the geometries have SRID=32633.
>
> The layers cover approximately the same area.
>
> msPOSTGISLayerGetExtent does not want to check the actual data and sets minx
> to -1*FLT_MAX and maxx to FLT_MAX.
> How can I help Mapserver determine the bounding box of a PostGIS layer?
> I was hoping it would be possible to give mapserver a hint? Something like
> specifying EXTENT for the LAYER?
> Is there a OWS/WMS parameter for this?
>
> --
> Håvard Tveite
> IMT, NLH
>



More information about the mapserver-users mailing list