Opened 23 years ago

Closed 21 years ago

#34 closed defect (fixed)

WMS - Wrong BoundingBox in capabilities

Reported by: dmorissette Owned by: dmorissette
Priority: high Milestone:
Component: WMS Server Version: 4.0
Severity: normal Keywords:
Cc: jdoyon@…, pspencer@…

Description

If a map file contains wms_srs metadata with some EPSG codes and data is in a 
projection with no EPSG code equivalent then the BoundingBox is still output 
using the map's default ground units but is advertized as being in the first 
projection in the wms_srs metadata.

Explanation may not be clear enough... here is an example... the following 
mapfile settings:

WEB
  ...
  METADATA
    "wms_title"         "GMap WMS Demo Server"
    "wms_onlineresource" "http://www2.dmsolutions.ca:8099/cgi-bin/mswms_gmap?"
    "wms_srs"   "EPSG:4269 EPSG:4326"
  END
END

PROJECTION
     "proj=lcc"
     "ellps=GRS80"
     "lat_0=49"
     "lon_0=-95"
     "lat_1=49"
     "lat_2=77"
END  

Will return this... in which the BoundingBox coordinates are not in the 
advertized SRS:

    <Title>GMap WMS Demo Server</Title>
    <SRS>EPSG:4269 EPSG:4326</SRS>
    <LatLonBoundingBox minx="-172.367" miny="35.6673" maxx="-11.5624" 
maxy="83.8293" />
    <BoundingBox SRS="EPSG:4269"
                minx="-2.2e+06" miny="-712631" maxx="3.0728e+06" maxy="3.84e+06" 
/>

Attachments (1)

bug218.JPG (86.4 KB ) - added by dmorissette 21 years ago.
screengrab showing map in LCC with grid at those extents

Download all attachments as: .zip

Change History (7)

comment:1 by dmorissette, 23 years ago

WMS 1.1.0 spec states that one BoundingBox tag is required per advertized SRS... 
and at the moment we return one only for the default SRS.

So at the same time as fixing the above problem we should make sure one 
BoundingBox tag is produced for each advertized SRS... this should likely be 
done by sampling points around the default projection's extent.

comment:2 by dmorissette, 21 years ago

Cc: assefa@… added
Version: 3.54.0
Let's see if we can fix the invalid bbox for 4.0.

About producing one BBOX tag per advertized SRS, I don't think we should do 
that, and anyway, the WMS 1.1.1 spec sect 7.1.4.5.7 says that it's optional:

  "A server which has the ability to transform data to different SRSes may
   choose not to provide an explicit BoundingBox for every possible SRS
   available for each Layer. The server should provide BoundingBox information
   for at least the native SRS of the Layer."

The above behavior is already what we do, we just need to fix the case where the 
bbox coordinates aren't properly advertized if the data is not in the default 
advertized SRS.

comment:3 by dmorissette, 21 years ago

*** Bug 217 has been marked as a duplicate of this bug. ***

by dmorissette, 21 years ago

Attachment: bug218.JPG added

screengrab showing map in LCC with grid at those extents

comment:4 by dmorissette, 21 years ago

attachments.isobsolete: 01
(From update of attachment 38)
OOppps... please disregard attachment above, it was added to the wrong bug

comment:5 by dmorissette, 21 years ago

Cc: spencer@… jdoyon@… added

comment:6 by dmorissette, 21 years ago

Resolution: fixed
Status: newclosed
Fixed in 4.0 CVS... finally!

The fix was simpler than I thought: If the MAP (or LAYER) contains a PROJECTION
block in the format "init=epsg:xxxx" then uses that to generate a <BoundingBox>
tag.  Otherwise we don't generate the <BoundingBox> tag since it's optional and
we don't have access to the original SRS and BBOX of the data in this case.

I also added a few notes in the wms-server-howto about this behavior in the
sections of the HOWTO that talk about layer and map projections.
Note: See TracTickets for help on using tickets.