citygml4j / citygml-tools

Collection of tools for processing CityGML files
Apache License 2.0
115 stars 18 forks source link

Problems with CityJson file converted from citygml #30

Closed nimafo closed 1 year ago

nimafo commented 1 year ago

I am trying to convert citygml files generated with Random3Dcity. It is a tool developed for procedurally generating 3D city models. It generates also models for interiors in 4 LoDs (0, 1, 2-2, 2-3). the problem is that after conversion to CityJson:

  1. the geometry in InteriorLoD2-2 and InteriorLoD2-3 is not maintained.
  2. InteriorLoD0 and InteriorLoD1 contain geometry, according to val3dity, whileInteriorLoD1 is valid, InteriorLoD1 has the following problems:
  • 104: Ring_self_intersection
  • 303: Non_Manifold_case
  • 307: Polygon_wrong_orientation

when I redo the conversion with --vertex-precision=20, val3dity gives:

102- CONSECUTIVE_POINTS_SAME

both for InteriorLoD0 and 1. I did it again with --vertex-precision=10 and --vertex-precision=15, which resulted in the same error for LoD1 I mentioned above(104, 303, 307).

  1. For InteriorLoD2-2 and InteriorLoD2-3 no geometries are maintained after conversion (error 609).
  2. For LoD3, not only there is missing geometry for some building installations, but also errors 102: Consecutive points same and 201: Intersection rings.

Validation of gmls When validating geometries in 3DCityDB, for all of the 5 files I get the following errors:

  • Invalid content

The complete description here. and

  • '7a7cae4a-d090-4c0c-922f-a29aea3e5c26' is not a valid value for 'NCName'

Other

clausnagel commented 1 year ago

Thanks, @nimafo, for opening an issue. We need more information though to be able to reproduce and work on the issue.

nimafo commented 1 year ago

Hi @clausnagel and thanks foar your quick response, sorry for incomplete issue, I completed the description.

clausnagel commented 1 year ago

Can you please verify your download link? I am only able to download the errors_3DcityDB.txt file but not the CityGML input datasets.

nimafo commented 1 year ago

@clausnagel I updated the link, I think it should work now. Sorry for this.

clausnagel commented 1 year ago

Thanks, the download works now. I validated your .gml files against the CityGML schemas and all of them are invalid. You can easily validate the files yourself using the validate command of citygml-tools (use version 2.0.0 rather than 2.0.0-rc.1). Some errors and findings:

interior-LOD0.gml

interior-LOD1.gml

interior-LOD2_2.gml

interior-LOD2_3.gml

LOD3_0.gml

To make a long story short: Your CityGML input files have many issues and are invalid. There is no way for citygml-tools to convert them to clean and valid CityJSON files. So, I see no immediate action for citygml-tools. It rather seems that Random3Dcity needs some fixing.

nimafo commented 1 year ago

@clausnagel This is great, thanks a lot for your thorough review of the files.