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

Test for 3D coordinates in GML #12

Open
heidivanparys opened this issue Apr 5, 2019 · 1 comment
Open

Test for 3D coordinates in GML #12

heidivanparys opened this issue Apr 5, 2019 · 1 comment

Comments

@heidivanparys
Copy link

Regarding the test for 3D coordinates in GML: I would like to suggest to split the test into two, so that the following 2 scenarios are checked:

  1. only srsName present
  2. srsName and srsDimension present

See the following tests with ogrinfo:

<gml:FeatureCollection
  xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3"
  xmlns:gml="http://www.opengis.net/gml/3.2"
  xmlns:tn="http://inspire.ec.europa.eu/schemas/tn/4.0"
  xmlns:net="http://inspire.ec.europa.eu/schemas/net/4.0"
  xmlns:tn-ra="http://inspire.ec.europa.eu/schemas/tn-ra/4.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3 http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://inspire.ec.europa.eu/schemas/tn/4.0 http://inspire.ec.europa.eu/schemas/tn/4.0/CommonTransportElements.xsd http://inspire.ec.europa.eu/schemas/net/4.0 http://inspire.ec.europa.eu/schemas/net/4.0/Network.xsd http://inspire.ec.europa.eu/schemas/tn-ra/4.0 http://inspire.ec.europa.eu/schemas/tn-ra/4.0/RailwayTransportNetwork.xsd"
  gml:id="id.example.2D.25832.no.srsDimension">
 <gml:featureMember>
  <tn-ra:RailwayLink gml:id="dk.tn-ra.1087552517">
   <net:beginLifespanVersion>2015-11-27T14:27:31</net:beginLifespanVersion>
   <net:inspireId>
    <base:Identifier>
     <base:localId>1087552517</base:localId>
     <base:namespace>http://data.gov.dk/inspire-tn-ra</base:namespace>
    </base:Identifier>
   </net:inspireId>
   <net:inNetwork xsi:nil="true" nilReason="other:unpopulated"/>
   <net:centrelineGeometry>
    <gml:LineString gml:id="id-bceb10c8-329c-4d2b-af3d-b7a0a18dc410-0" srsName="http://www.opengis.net/def/crs/EPSG/0/25832">
     <gml:posList>711530.29 6190097.44 711518.28 6190116.1</gml:posList>
    </gml:LineString>
   </net:centrelineGeometry>
   <net:fictitious>false</net:fictitious>
   <tn:geographicalName xsi:nil="true" nilReason="other:unpopulated"/>
   <tn:validFrom>2015-11-27T14:27:31</tn:validFrom>
  </tn-ra:RailwayLink>
 </gml:featureMember>
 </gml:FeatureCollection>

Correct result: LINESTRING (711530.29 6190097.44,711518.28 6190116.1)

<gml:FeatureCollection
  xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3"
  xmlns:gml="http://www.opengis.net/gml/3.2"
  xmlns:tn="http://inspire.ec.europa.eu/schemas/tn/4.0"
  xmlns:net="http://inspire.ec.europa.eu/schemas/net/4.0"
  xmlns:tn-ra="http://inspire.ec.europa.eu/schemas/tn-ra/4.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3 http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://inspire.ec.europa.eu/schemas/tn/4.0 http://inspire.ec.europa.eu/schemas/tn/4.0/CommonTransportElements.xsd http://inspire.ec.europa.eu/schemas/net/4.0 http://inspire.ec.europa.eu/schemas/net/4.0/Network.xsd http://inspire.ec.europa.eu/schemas/tn-ra/4.0 http://inspire.ec.europa.eu/schemas/tn-ra/4.0/RailwayTransportNetwork.xsd"
  gml:id="id.example.2.5D.7416.srsDimension">
 <gml:featureMember>
  <tn-ra:RailwayLink gml:id="dk.tn-ra.1087552517">
   <net:beginLifespanVersion>2015-11-27T14:27:31</net:beginLifespanVersion>
   <net:inspireId>
    <base:Identifier>
     <base:localId>1087552517</base:localId>
     <base:namespace>http://data.gov.dk/inspire-tn-ra</base:namespace>
    </base:Identifier>
   </net:inspireId>
   <net:inNetwork xsi:nil="true" nilReason="other:unpopulated"/>
   <net:centrelineGeometry>
    <gml:LineString gml:id="id-bceb10c8-329c-4d2b-af3d-b7a0a18dc410-0" srsName="http://www.opengis.net/def/crs/EPSG/0/7416" srsDimension="3">
     <gml:posList>711530.29 6190097.44 31.24 711518.28 6190116.1 31.27</gml:posList>
    </gml:LineString>
   </net:centrelineGeometry>
   <net:fictitious>false</net:fictitious>
   <tn:geographicalName xsi:nil="true" nilReason="other:unpopulated"/>
   <tn:validFrom>2015-11-27T14:27:31</tn:validFrom>
  </tn-ra:RailwayLink>
 </gml:featureMember>
 </gml:FeatureCollection>

Correct result: LINESTRING Z (711530.29 6190097.44 31.24,711518.28 6190116.1 31.27)

<gml:FeatureCollection
  xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3"
  xmlns:gml="http://www.opengis.net/gml/3.2"
  xmlns:tn="http://inspire.ec.europa.eu/schemas/tn/4.0"
  xmlns:net="http://inspire.ec.europa.eu/schemas/net/4.0"
  xmlns:tn-ra="http://inspire.ec.europa.eu/schemas/tn-ra/4.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3 http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://inspire.ec.europa.eu/schemas/tn/4.0 http://inspire.ec.europa.eu/schemas/tn/4.0/CommonTransportElements.xsd http://inspire.ec.europa.eu/schemas/net/4.0 http://inspire.ec.europa.eu/schemas/net/4.0/Network.xsd http://inspire.ec.europa.eu/schemas/tn-ra/4.0 http://inspire.ec.europa.eu/schemas/tn-ra/4.0/RailwayTransportNetwork.xsd"
  gml:id="id.example.2.5D.7416.no.srsDimension">
  <gml:featureMember>
  <tn-ra:RailwayLink gml:id="dk.tn-ra.1087552517">
   <net:beginLifespanVersion>2015-11-27T14:27:31</net:beginLifespanVersion>
   <net:inspireId>
    <base:Identifier>
     <base:localId>1087552517</base:localId>
     <base:namespace>http://data.gov.dk/inspire-tn-ra</base:namespace>
    </base:Identifier>
   </net:inspireId>
   <net:inNetwork xsi:nil="true" nilReason="other:unpopulated"/>
   <net:centrelineGeometry>
    <gml:LineString gml:id="id-bceb10c8-329c-4d2b-af3d-b7a0a18dc410-0" srsName="http://www.opengis.net/def/crs/EPSG/0/7416">
     <gml:posList>711530.29 6190097.44 31.24 711518.28 6190116.1 31.27</gml:posList>
    </gml:LineString>
   </net:centrelineGeometry>
   <net:fictitious>false</net:fictitious>
   <tn:geographicalName xsi:nil="true" nilReason="other:unpopulated"/>
   <tn:validFrom>2015-11-27T14:27:31</tn:validFrom>
  </tn-ra:RailwayLink>
 </gml:featureMember>
 </gml:FeatureCollection>

Incorrect result!: LINESTRING (711530.29 6190097.44,31.24 711518.28,6190116.1 31.27)

The expected result is LINESTRING Z (711530.29 6190097.44 31.24,711518.28 6190116.1 31.27).

sMorrone added a commit that referenced this issue Apr 8, 2019
will upload two different testcases for 3D points -one test file will have both srsName and srsDimension attributes and the other will have no srsDimension . see issue #12
sMorrone added a commit that referenced this issue Apr 8, 2019
3D point AD example - only srsName attribute set for geometry. See #12
sMorrone added a commit that referenced this issue Apr 8, 2019
3D polygons PS example - only srsName attribute set. see #12
sMorrone added a commit that referenced this issue Apr 8, 2019
3D lines TN example - only srsName attribute set - see #12
@sMorrone
Copy link
Collaborator

sMorrone commented Apr 8, 2019

Indeed the issue is present for lines and polygons. Conversely, point geometries are correctly recognised as 'POINTZ' no matter the srsDimension attribute is specified or not.
New test cases have been uploaded for 3d points, poly and lines in the canIuse repository.
The test results have been updated accordingly.

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

No branches or pull requests

2 participants