Opened 15 years ago

Last modified 14 years ago

#3076 new defect

DefaultSRS string value is stripped off from the end.

Reported by: nsavard Owned by: assefa
Priority: normal Milestone: 6.0 release
Component: WFS Server Version: 5.4
Severity: normal Keywords: ogc, cite, wfs, 1.1.0, getcapabilities, validate, epsg, uri
Cc: dmorissette, warmerdam

Description

The DefaultSRS strig value is stripped off from the end. The expected value is "urn:ogc:def:crs:EPSG:6.3:4326" and the actual value is displayed below. The main consequence of that is that the capabilities document does not validate when running the OGC WFS 1.1.0 tests suite at http://cite.opengeospatial.org/te2.

The request is:
http://dev1.lan.mapgears.com/manwe/cgi-bin/mswfs110_ogc_cite?&VeRsIoN=1.1.0&SeRvIcE=wfS&ReQuEsT=Getcapabilities

...
<FeatureType>
<Name>Other</Name>
<Title>cdf:Other</Title>
<Abstract>Other layer.</Abstract>
<DefaultSRS>urn:ogc:def:crs:EPS</DefaultSRS>
−<OutputFormats>
<Format>text/xml; subtype=gml/3.1.1</Format>
</OutputFormats>
−<ows:WGS84BoundingBox dimensions="2">
...

Attachments (2)

ms_ogc_cite_wfs110.tgz (1.7 KB ) - added by nsavard 15 years ago.
tarball of the mapfile
bug_3076.patch (745 bytes ) - added by assefa 15 years ago.
patch for mapwfs11.c

Download all attachments as: .zip

Change History (10)

comment:1 by tomkralidis, 15 years ago

Norm: I'm getting "EPSG:4326" as the !DefaultSRS. Can you post the mapfile?

by nsavard, 15 years ago

Attachment: ms_ogc_cite_wfs110.tgz added

tarball of the mapfile

comment:2 by dmorissette, 15 years ago

Cc: dmorissette added
Owner: changed from mapserverbugs to assefa

by assefa, 15 years ago

Attachment: bug_3076.patch added

patch for mapwfs11.c

comment:3 by assefa, 15 years ago

the map file srs should be EPSG:4326.

The return srs is urn:ogc:def:crs:EPSG::4326. Is this not valid? I see that what is expected is urn:ogc:def:crs:EPSG:6.3:4326. I am not sure what the 6.3 refers to: is it a version?

comment:4 by tomkralidis, 15 years ago

Cc: warmerdam added

6.3 is the version of the EPSG database, I believe. I have seen both forms of this (with and without version number), so I'm not sure which is more 'valid'. I would guess with the version number.

comment:5 by warmerdam, 15 years ago

We would be better returning ...:EPSG::4326 without an explicit version. We don't do version checking, and if we embed a fixed version we won't know when to update it. Leaving it empty means unknown/unconstrained version.

comment:6 by assefa, 15 years ago

I am wondering if I should apply the patch:

  • would other tools (such as Arc) be confused by this change? (returning ur:xxx instead of simply espg:xxx )
  • I also noted that when returning the gml, we return EPSG:XXXX as the srsName parameter. I believe that the correct way would be to return using the urn notation. Here again hopefully clients would be able to read it properly (if they ever need to read it)

As for the version, I agree we should leave it empty but if we need to set it for the purpose of ogc cite tests, we might be able to use some kind of setting from the map file to set the epsg version number. This would go though after 5.6

comment:7 by assefa, 14 years ago

Milestone: 5.6 release6.0 release

patch is attached. Will commit after doing more tests with the cite WFS 1.1.0

comment:8 by nsavard, 14 years ago

I tested locally the patch suggested by Assefa but it didn't solve the validation problem. So I dug in the specification (OGC 04-094 see below) and the "EPSG:4326" string should work. It validated with XML Spy. I think this is a test issue. Any thoughts?

The test result output is similar with "EPSG:4326" than "urn:ogc:def:crs:EPSG::4326":

Test ctl:SchematronValidatingParser (s0001/d1e34887_1/d1e554_1)

Assertion: Validate an XML instance against a Schematron schema using the given phase.

Message d1e186_1:
   Total number of errors detected: 1

Message d1e192_1:
   Error 1: Line 125 - assertion failed:
  DefaultSRS value is not a valid URI (invalid scheme name or URN namespace identifier).
  The DefaultSRS is urn:ogc:def:crs:EPSG::4326.


Result: Failed



OGC 04-094 specification:

The optional srsName attribute of the <Query> element is used to specify a specific
WFS-supported SRS to be used for returned feature geometries. Its value may be the
<DefaultSRS> or any of the <OtherSRS> values listed for the feature type in WFS
capabilities document. If no srsName value is supplied, then the features shall be
returned using the advertised <DefaultSRS> value. This attribute has no meaning for
feature types with no spatial properties; if an srsName value is specified for a feature
with no spatial properties, a web feature service may ignore the parameter and its value.
Any valid URI value can be assigned to the srsName attribute. However, in order to
enhance interoperability, a web feature service must be able to process srsName attribute
values with the following format models:
    •   EPSG:<EPSG code>
    •   http://www.opengis.net/gml/srs/epsg.xml#<EPSG code>
    •   urn:EPSG:geographicCRC:<epsg code>
In these format models, the values <EPSG code> are placeholders for actual EPSG code
values. Here is an example of the srsName where the assigned value follows one of the
required format models: srsName="urn:EPSG:geographicCRS:63266405".
Note: See TracTickets for help on using tickets.