-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GML geometry importer / GMLAS: be robust to leading spaces in <gml:co…
…ordinates> element (fixes #5494)
- Loading branch information
Showing
4 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
autotest/ogr/data/gmlas/coordinates_with_leading_space.gml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ogr:FeatureCollection | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://ogr.maptools.org/ coordinates_with_leading_space.xsd" | ||
xmlns:ogr="http://ogr.maptools.org/" | ||
xmlns:gml="http://fake_gml32"> | ||
<ogr:featureMember> | ||
<ogr:AffleurantEnveloppePCRS gml:id="AffleurantEnveloppePCRS.0"> | ||
<ogr:geometrie><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing> | ||
<gml:coordinates> | ||
1372074.8935456767,6205942.497461504,40.425811736193694 | ||
1372074.5535202357,6205942.435638697,40.425811736193694 | ||
1372074.5071531301,6205942.690657778,40.425811736193694 | ||
1372074.8471785712,6205942.752480585,40.425811736193694 | ||
1372074.8935456767,6205942.497461504,40.425811736193694 | ||
</gml:coordinates> | ||
</gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometrie> | ||
</ogr:AffleurantEnveloppePCRS> | ||
</ogr:featureMember> | ||
</ogr:FeatureCollection> |
36 changes: 36 additions & 0 deletions
36
autotest/ogr/data/gmlas/coordinates_with_leading_space.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xs:schema targetNamespace="http://ogr.maptools.org/" xmlns:ogr="http://ogr.maptools.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://fake_gml32" elementFormDefault="qualified" version="1.0"> | ||
|
||
<xs:import namespace="http://fake_gml32" schemaLocation="gmlas_fake_gml32.xsd"/> | ||
|
||
<xs:element name="FeatureCollection" type="ogr:FeatureCollectionType" substitutionGroup="gml:AbstractFeature"/> | ||
<xs:complexType name="FeatureCollectionType"> | ||
<xs:complexContent> | ||
<xs:extension base="gml:AbstractFeatureType"> | ||
<xs:sequence minOccurs="0" maxOccurs="unbounded"> | ||
<xs:element name="featureMember"> | ||
<xs:complexType> | ||
<xs:complexContent> | ||
<xs:extension base="gml:AbstractFeatureMemberType"> | ||
<xs:sequence> | ||
<xs:element ref="gml:AbstractFeature"/> | ||
</xs:sequence> | ||
</xs:extension> | ||
</xs:complexContent> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:extension> | ||
</xs:complexContent> | ||
</xs:complexType> | ||
<xs:element name="AffleurantEnveloppePCRS" type="ogr:AffleurantEnveloppePCRS_Type" substitutionGroup="gml:AbstractFeature"/> | ||
<xs:complexType name="AffleurantEnveloppePCRS_Type"> | ||
<xs:complexContent> | ||
<xs:extension base="gml:AbstractFeatureType"> | ||
<xs:sequence> | ||
<xs:element name="geometrie" type="gml:SurfacePropertyType" nillable="true" minOccurs="0" maxOccurs="1"/> <!-- restricted to Polygon --> | ||
</xs:sequence> | ||
</xs:extension> | ||
</xs:complexContent> | ||
</xs:complexType> | ||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9819da9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @rouault