[mapserver-users] postgis wms bounding box

Frank Broniewski liste at geo-dienstleistung.de
Tue Apr 22 04:33:45 PDT 2008


Thanks Michael,

that solved the issue. This issue is so close to  "RTFM" that I am really 
ashamed to post again ;-), but I really did not find it in the wms how-to. 
Well thanks again for the tipp.

Just one more question though. Is it possible to determine the extent of the 
postgis layer somehow dynamically, maybe within a query? I just think of a 
dynamically growing table where the extent might change anytime and I would 
have to adjust the extent in the mapfile each time the extent gets bigger.

Greetings Frank

On Tuesday 22 April 2008 12:29:46 Michael Schulz wrote:
> 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





More information about the MapServer-users mailing list