Ticket #2579 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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

Changed 5 years ago by tomkralidis

  • cc tomkralidis added

Changed 5 years ago by tomkralidis

  • cc mapserverbugs added; tomkralidis removed
  • owner changed from mapserverbugs to tomkralidis
  • status changed from new to assigned
  • milestone set to 5.2 release

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.

Changed 5 years ago by tomkralidis

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.

Changed 5 years ago by ctweedie

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)

Changed 5 years ago by tomkralidis

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?!

Changed 5 years ago by tomkralidis

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.