Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor / Polygon / Fix validation error on srsName and id attributes. #70

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

fxprunayre
Copy link
Contributor

When adding bounding polygon, issues are reported on validation.

image

Since OL6 update, an srsName is added to LinearRing in GML3.2.0.

image

GML2 OL format was not. See
https://github.com/openlayers/openlayers/blame/v6.3.1/src/ol/format/GML2.js#L228
.
GML3 does https://github.com/openlayers/openlayers/blob/v6.3.1/src/ol/format/GML3.js#L503

From the XSD, this attribute should probably not be added https://schemas.wmo.int/wmdr/1.0RC6/documentation/schemadoc/schemas/geometryBasic2d_xsd/elements/LinearRing.html.

Workaround that issue by updating LinearRing in update-fixed-info.xsl.

Since OL6 update, an srsName is added to LinearRing in GML3.2.0.
GML2 OL format was not. See
 https://github.com/openlayers/openlayers/blame/v6.3.1/src/ol/format/GML2.js#L228
.
GML3 does https://github.com/openlayers/openlayers/blob/v6.3.1/src/ol/format/GML3.js#L503

From the XSD, this attribute should probably not be added https://schemas.wmo.int/wmdr/1.0RC6/documentation/schemadoc/schemas/geometryBasic2d_xsd/elements/LinearRing.html.

Workaround that issue by updating `LinearRing` in `update-fixed-info.xsl`.
<xsl:template match="gml:Polygon[not(@gml:id) and not(@srsName)]|
gml:MultiSurface[not(@gml:id) and not(@srsName)]|
gml:LineString[not(@gml:id) and not(@srsName)]">
<xsl:template match="gml:Polygon[not(@gml:id) or not(@srsName)]|
Copy link
Contributor

@josegar74 josegar74 Jun 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change the gml:id or srsName are going to be replaced if 1 of the values are not filled, should not be checked if are filled to copy them instead of setting the value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants