Opened 16 years ago

Closed 16 years ago

#2579 closed defect (fixed)

SRS of LatLongBoundingBox in WFS GetCapabilities

Reported by: guillaume Owned by: tomkralidis
Priority: normal Milestone: 5.2 release
Component: WFS Server Version: svn-trunk (development)
Severity: normal Keywords:
Cc: mapserverbugs

Description

The SRS of LatLongBoundingBox in WFS GetCapabilities seems to always be WGS84, which is not the WFS specs intend it to be : "The LatLongBoundingBox element is used to indicate the edges of an enclosing rectangle in the SRS of the associated feature type."

Change History (6)

comment:1 by tomkralidis, 16 years ago

Cc: tomkralidis added

comment:2 by tomkralidis, 16 years ago

Cc: mapserverbugs added; tomkralidis removed
Milestone: 5.2 release
Owner: changed from mapserverbugs to tomkralidis
Status: newassigned

True. This happens in msOWSPrintLatLongBoundingBox, which covers both WMS and WFS. Moreover, the WMS DTD forces this to be in 4326, whereas WFS does not:

In: http://schemas.opengis.net/wms/1.1.1/WMS_MS_Capabilities.dtd

<!-- The LatLonBoundingBox attributes indicate the edges of the enclosing
rectangle in latitude/longitude decimal degrees (as in SRS EPSG:4326 [WGS1984
lat/lon]). -->
<!ELEMENT LatLonBoundingBox EMPTY>
<!ATTLIST LatLonBoundingBox 
          minx CDATA #REQUIRED
          miny CDATA #REQUIRED
          maxx CDATA #REQUIRED
          maxy CDATA #REQUIRED>

In: http://schemas.opengis.net/wfs/1.0.0/WFS-capabilities.xsd

   <!-- The LatLongBoundingBox element is used to indicate the edges of 
        an enclosing rectangle in the SRS of the associated feature type.
        Its purpose is to facilitate geographic searches  by indicating
        where instances of the particular feature type exist.  Since multiple
        LatLongBoundingBoxes can be specified, a WFS can indicate where 
        various clusters of data may exist.  This knowledge aids client 
        applications by letting them know where they should query in order 
        to have a high probability of finding data. -->
   <xsd:complexType name="LatLongBoundingBoxType">
      <xsd:attribute name="minx" type="xsd:string" use="required"/>
      <xsd:attribute name="miny" type="xsd:string" use="required"/>
      <xsd:attribute name="maxx" type="xsd:string" use="required"/>
      <xsd:attribute name="maxy" type="xsd:string" use="required"/>
   </xsd:complexType>

I'll alter msOWSPrintLatLongBoundingBox() such that it only projects if WMS.

comment:3 by tomkralidis, 16 years ago

Fixed in r7718:

  • If WMS, function will always projection to latlong (i.e. existing behaviour)
  • If WFS, function will project from layer native projection to the output WFS EPSG code's projection, to match its sibling SRS element

Verified in msautotest. No doc changes required.

comment:4 by ctweedie, 16 years ago

Tom, you might want to query wfs-dev on this one, as i remember a lot of discussion on this a year or so ago. Certainly the Geoserver guys took the "latlon"boundingbox very literally, and will always report WGS84 even when the featuretype is projected (the current mapserver behaviour)

comment:5 by tomkralidis, 16 years ago

ctweedie: thanks for the info. It is a bit confusing (i.e. the schema has a clear def of the SRS of the data, whereas the element name suggest latlong. Why couldn't it just be named BoundingBox?!

comment:6 by tomkralidis, 16 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.