[mapserver-users] postgis wms bounding box

Michael Schulz mschulz at webgis.de
Tue Apr 22 06:29:46 EDT 2008


Hi Frank,

that is a known problem with postgis layers. If i recall it correctly
it is basically due to the fact that it is timely expensive to
calculate the extent of a postgis layer (it'd need to be done for each
getCap request). You can come around this by specifying the wms_extent
metadata parameter for that layer manually.

Cheers, Michael


2008/4/22 Frank Broniewski <liste at geo-dienstleistung.de>:
> 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
>  _______________________________________________
>  mapserver-users mailing list
>  mapserver-users at lists.osgeo.org
>  http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



-- 
-----------------------------------------------------------
Michael Schulz
mschulz at webgis.de

in medias res
Gesellschaft für Informationstechnologie mbH

In den Weihermatten 66
79108 Freiburg

Tel +49 (0)761 556959-5
Fax +49 (0)761 556959-6

http://www.webgis.de / http://www.zopecms.de
-----------------------------------------------------------


More information about the mapserver-users mailing list