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

GML: should use srsDimension as global same to srsName? #6986

Closed
Kanahiro opened this issue Dec 28, 2022 · 3 comments · Fixed by #6998
Closed

GML: should use srsDimension as global same to srsName? #6986

Kanahiro opened this issue Dec 28, 2022 · 3 comments · Fixed by #6998
Assignees

Comments

@Kanahiro
Copy link

Thesedays I've tried to use CityGML formatted data with GDAL/OGR and found some interesting issues.

By these, when parsing GML which has 3d-vertices but srsDimension is not defined in each feature, ogr sometimes reads 3D-vertex as 2D incorrectly.
In above testdata, features are Solid type and this type seems to be treated as 3D (code). Therefore, parsing looks working well on autotest but this issue is not tested.

sampledata: 533946_urf_6668_yoto_op.gml.zip from https://www.geospatial.jp/ckan/dataset/plateau-tokyo23ku, CC-BY 4.0

discussion

  • Can we use srsDimension in envelop as global same to srsName?
@jratike80
Copy link
Collaborator

I am not sure how the CityGML standard should be interpreted but doesn't this mean that all geometries should have 3d vertices and the extent is meaningful?

Spatial properties of all CityGML feature types are represented using the geometry classes defined in ISO 19107. Spatial representations can have 0-, 1-, 2-, or 3-dimensional extents depending on the respective feature type and Levels of Detail (LOD; the LOD concept is discussed in Clause 6.4.4 and Clause 7.2.5). With only a few exceptions, all geometries must use 3D coordinate values.

@Kanahiro
Copy link
Author

Kanahiro commented Dec 29, 2022

Thank you for very important comment. That sentences seems to be in https://docs.ogc.org/is/20-010/20-010.html#toc23 .

With only a few exceptions, all geometries must use 3D coordinate values.

For me this could be read as CityGML coordinates are in 3D except for few exceptions but ogr parses GML in 2D as default (you can change this behavior by setting environment variable GML_SRS_DIMENSION_IF_MISSING) . Although this is a different issue to should use srsDimension as global, it is important to take this into consider.

  1. Should we use srsDimension in envelope as global, same to srsName?
  2. in parsing CityGML, should dimension be treated in 3D as default? (current default is 2D)

2 should be discussed in other issue, I've posted.

@rouault
Copy link
Member

rouault commented Dec 30, 2022

dealt in #6998

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 a pull request may close this issue.

3 participants