GML Linearring should not have srsName attribute
See original GitHub issueDescribe the bug
The OpenLayers GML formats have an issue serializing a geometry to GML: <gml:LinearRing>
element should not have srsName
attribute.
Reference: http://www.datypic.com/sc/niem21/e-gml32_LinearRing.html
To Reproduce Steps to reproduce the behavior:
- Create an ol geometry
- Write features from GML format of this geometry
- Output GML (both version 2 and 3) will have an
srsName
<gml:exterior>
<gml:LinearRing srsName="urn:x-ogc:def:crs:EPSG:4326">
<gml:posList srsDimension="2">38.5571 -75.7071 38.4631 -75.6991 38.4551 -75.3501
Expected behavior
<gml:LinearRing>
does not have srsName
attribute.
<gml:exterior>
<gml:LinearRing>
<gml:posList srsDimension="2">38.5571 -75.7071 38.4631 -75.6991 38.4551 -75.3501
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Draft Thoughts on best practices for using GML in HAVE ...
The gml:id attribute is retained so that geometry objects may still be the target of a ... The following example does not use...
Read more >Schema documentation for namespace http://www.opengis ...
If no srsName attribute is given, the CRS must be specified as part of the larger context this geometry element is part of,...
Read more >#5606 (Position of srsDimension in GML structure) – GDAL
The following GML will not parse as 3-dimensional. ... <gml:LinearRing> ... When the srsName attribute is omitted, this attribute shall be omitted." " ......
Read more >Problem converting to SqlGeometry from gml - MSDN - Microsoft
Answers · 1) Remove srsName attribute to avoid the error 24130 · 2) Replace 'outerBoundaryIs' by 'exterior' · 3) Replace 'coordinates' by 'posList'....
Read more >Schema documentation for geometryBasic0d1d.xsd
The gml:axisAbbrev value should be used for these axis labels, after spaces and forbiddden characters are removed. When the srsName attribute is included, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess the most generic way to achieve this is a change in our GML serializers so the
srsName
is only set on the “outermost” geometric entity. So in the case of a polygon, only thegml:Polygon
would get the attribute. Or e.g. for aMultiPoint
, only thegml:MultiPoint
and not its point members.Correct. In GML2, a LinearRing is a geometry primitive, which can have a srsName, but the spec states in 4.3.3
Also in GML3, the
LinearRingPropertyType
, which is used for the rings of a polygon, is made of a sequence ofLinearRing
s, which have a hierarchy of AbstractRing -> AbstractCurve -> AbstractGeometricPrimitive -> AbstractGeometry. For that, the spec statesOpenLayers also has a
LinearRing
geometry. If such aLinearRing
is serialized in GML, itssrsName
attribute makes sense and is needed to indicate the SRS. For the rings of a polygon, there is nothing wrong about proposing the removal of thesrsName
, at least for GML2. But for both GML2 and GML3, the XML is still valid with thesrsName
on aLinearRing
, also for the rings of a Polygon.