Bbox in GetCapabilies for PostGIS layer

Barend K ö bben kobben at ITC.NL
Fri Oct 26 03:51:39 EDT 2007


[sorry, pressed send to quickly...]

Hi Daniel and others,

We noticed that error also, and indeed setting the ows_extent on the layers
works. Note however that basically Mapserver is making a strange move: If it
cannot get the extent automatically out of one of its layers LAYER , it DOES
set an extent on the parent layer's BBOX (what I'd call the service extent),
and so apparently CAN extract the BBOX automatically. However, on the LAYER
it does not do that and instead sets an erroneaus BBOX of inifinite extent.
See the fragment of GetCapabilities below that is the result of 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

<Layer>
    <Name>enschede</Name>
    <Title>enscad</Title>
    <SRS>EPSG:28992</SRS>
    <LatLonBoundingBox minx="6.68308" miny="52.2069" maxx="6.91093"
maxy="52.2937" />
    <BoundingBox SRS="EPSG:28992"
                minx="243530" miny="469736" maxx="258910" maxy="479096" />
    <Layer queryable="0" opaque="0" cascaded="0">
        <Name>enscadparcels</Name>
        <Title>enscadparcels</Title>
        <SRS>EPSG:28992</SRS>
        <LatLonBoundingBox minx="-179.999" miny="-75.0102" maxx="179.078"
maxy="2.87828" />
        <BoundingBox SRS="EPSG:28992"
                    minx="-2.5e+007" miny="-2.5e+007" maxx="2.5e+007"
maxy="2.5e+007" />

In my opinion this is a genuine bug, its houdl either set the correct extent
on the layer or leave it out altogether, so the client can fall back on the
'service' extent...



Barend


On 25-10-2007 21:54, "Daniel Morissette" <dmorissette at MAPGEARS.COM> wrote:

> The postgis implementation in MapServer may not support reading the real
> data extents automatically (I just don't know), but you should be able
> to set the ows_extent metadata in your layer to tell MapServer which
> extents to use for the BoundingBox in capabilities. By default if
> ows_extent is not specified then MapServer tries to get the extents from
> PostGIS and it seems that it returns something that's way larger than
> the actual data.
> 
> Daniel
> 
> Bart van den Eijnden wrote:
>> Hi Yves,
>> 
>> unfortunately this is not implemented for PostGIS.
>> 
>> Best regards,
>> Bart
>> 
>> On 10/25/07, *Jacolin Yves* < yjacolin at free.fr
>> <mailto:yjacolin at free.fr>> wrote:
>> 
>>     Hi list,
>> 
>>     I am working on an application using only OGC standards. I am
>>     successfully
>>     create my list of layer from a GetCapabilities request. I would like
>>     to add
>>     an overview for each of this layer, and so I processed the bbox,
>>     scaleHint to
>>     send a GetMap.
>> 
>>     However, I have a problem with all postgis layer because the bbox
>>     for all of
>>     my bbox are something like this :
>>             <BoundingBox SRS="EPSG:27582" minx="-2.5e+07" miny="-2.5e+07"
>>     maxx="2.5e+07" maxy="2.5e+07" />
>> 
>>     which is obviously incorrect.
>> 
>>     My srid postgis layer is set to -1, but the data are in srid =
>>     27582. Do you
>>     think my problem come from this set up ? My projections are always
>>     set up to
>>     EPSG:27572 in my mapfile.
>> 
>>     Thanks,
>> 
>>     Y.
>>     --
>>     Yves Jacolin
>>     ---
>>     http://softlibre.gloobe.org
>> 
>> 
> 



More information about the mapserver-users mailing list