[mapserver-users] postgis wms bounding box

Frank Broniewski liste at geo-dienstleistung.de
Tue Apr 22 05:26:42 EDT 2008


Hello List,

I am setting up a wms server which retrieves its data from a postgis database 
and I am having trouble displaying the layer in QGIS or OpenJump correctly. 
QGIS doesn't show anything at all, while openjump requires zooming in to see 
the data. A getmap request (without bbox-parameter) in the browser does give 
me a "correct" view of the data. I am using on Ubuntu 7.10

MapServer version 4.10.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER 
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT 
SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=EPPL7 INPUT=POSTGIS 
INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG

Having a look at the getcapabilites document, there seems to be a problem with 
the calculation of the layer extents: here's the global extent from the 
getcapabilities response:

<LatLonBoundingBox minx="5.73166" miny="49.446" maxx="6.53226" 
maxy="50.1818" />
<BoundingBox SRS="EPSG:2169" minx="48928" miny="57005" maxx="106114" 
maxy="138765" />

And here's the bbox from the actual postgis layer:
<LatLonBoundingBox minx="-179.798" miny="-2.19659e+13" maxx="177.392" 
maxy="2.63905e+18" />
<BoundingBox SRS="EPSG:2169" minx="-2.5e+07" miny="-2.5e+07" maxx="2.5e+07" 
maxy="2.5e+07" />

As you can see, the bounding box of the layer is completely wrong. It should 
nearly be the same as the global extent. The data definition in the mapfile 
is:
Data "centroid from public.locations using unique id"

Any suggestions? Should I return a bbox in the data query for the postgis 
layer to prevent the wrong bbox of the layer? And if yes, how do I do this?

Greetings from Luxembourg

Frank


More information about the mapserver-users mailing list