Hi Andrea,

thank you for the clarifications.

We use GML3,

***snip***
configuration = new
org.geotools.gml3.ApplicationSchemaConfiguration(namespace, schemaLocation);
                
encoder = new org.geotools.xml.Encoder(configuration);
encoder.setNamespaceAware(true);
encoder.setSchemaLocation("http://www.opengis.net/gml
http://schemas.opengis.net/gml/3.1.1/base/feature.xsd";, namespace + " "
+ schemaLocation);
QName ns = new
QName("http://www.opengis.net/gml","FeatureCollection","wfs";);

encoder.encode(featureCollection, ns, os);
***snip***

the outcome is
http://www.opengis.net/gml/srs/epsg.xml#4326

which is not compliant to the current OGC policy. I am under the
impression that if such an URL is used, then is should be the correct one.

So my question is, how can we switch it?

Besides, do GML2 and GML3 differ in terms of srsName? Do they dictate at
all what goes into the srsName? Clemens Portele as the chairman of the
GML standards group told me: "GML does not prescribe any specific CRS
registry or identifier set"

Regards,
Bastian Schäffer

Am 19.06.2010 08:13, schrieb Andrea Aime:
> Bastian Schäffer ha scritto:
>> List,
>>
>> during the latest OGC OWS-7 testbed, we encountered some issues with the
>> GML3 srsName encoding:
>>
>> A generated FeatureCollection, where the featureType's SRS is correctly
>> set to a representation of EPSG:4326, the result looks like:
>>
>> <gml:Envelope srsName="http://www.opengis.net/gml/srs/epsg.xml#4326";>
>>
>> By looking at the OGC practice as defined in the OGC policy directives,
>> in particular
>>
>>  http://portal.opengeospatial.org/files/?artifact_id=37802
>>
>> the correct URI would be urn:ogc:def:crs:EPSG::4326.
>> The equivalently correct URL would be
>> http://www.opengis.net/def/crs/EPSG/0/4326.
>>
>> This differes from http://www.opengis.net/gml/srs/epsg.xml#4326
>>
>> Is it possible to set the value for srsName manually? Or fix the code
>> for future version?
> 
> I would strongly recommend against that if you keep on generating GML2.
> The EPSG:4326 vs http://www.opengis.net/gml/srs/epsg.xml#4326 vs
> urn:ogc:def:crs:EPSG::4326 is not only a matter of giving a name,
> it's also a matter of:
> - GML version used
> - axis order
> 
> The urn notation was released at the same time as GML3 and WFS 1.1,
> so I would recommend that you switch to GML3 encoding if you want
> to use the urn notation, a GML2 parser won't be likely to recognize
> the new notation.
> 
> The second issue is that when relasing the first two notation the
> axis order was not well specified and everybody went lon/lat, but
> when releasing the urn:ogc:def:crs:EPSG::4326
> notation OGC stated that you have to use the "auhority axis order"
> which in the case of EPSG means lat/lon for most (all?) geographic
> coordinate systems.
> 
> Compare this WFS 1.0 output:
> http://demo.opengeo.org/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=tiger:poi&maxFeatures=1
> 
> with the compliant WFS 1.1 one:
> http://demo.opengeo.org/geoserver/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=tiger:poi&maxFeatures=1
> 
> (I know it seems odd, I had quite a long and sorry discussion with OGC
>  representatives about that and they were adamant that is the correct
>  behavior)
> 
> The second uses the urn notation recommended at the time WFS 1.1
> was written (urn:x-ogc:def:crs:EPSG:4326) and _flips_ the coordinates.
> A capable GML3 parser should be able to handle that, but I fear not
> many really can.
> 
> I believe that when we'll start encoding GML 3.2 we'll also have to
> switch to the "newer"  urn:ogc:def:crs:EPSG::4326 notation (a WFS 1.1
> client following the spec is not guaranteed to be able to parse it
> due to the minor changes OGC made in it).
> 
>>
>> P.S.
>> During the last OGC TC meeting held this week, it was decided that the
>> OGC will mainly use URLs instead of URIs as identifiers.
> 
> Hummm... odd? urn:x-ogc:def:crs:EPSG:4326 is a URI but not a URL afaik
> 
> Cheers
> Andrea
> 


-- 
Bastian Schäffer
Institute for Geoinformatics (IfGI), University of Muenster, Germany
Weseler Str. 253, 48151 Muenster
Fon: +49 (0)251 - 83-30046   Fax: +49 (0)251 - 83-39763
email: [email protected]
IfGI-site: http://ifgi.uni-muenster.de




------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to