3dcitydb / citydb-tool

3D City Database 5.0 CLI to import/export city model data and to run database operations
Apache License 2.0
11 stars 2 forks source link

Visualization of CityGML 3.0 using 3D Web Client #24

Open Tinn-da opened 4 months ago

Tinn-da commented 4 months ago

Is there a way to export CityGML3.0 data in KML/COLLADA/glTF format using 3DCityDB?

If I get it right, according to the 3dcitydb-docs of latest version, 3D Web Client visualizes KML/COLLADA/gITF data exported from 3DCityDB by using importer-exporter tool. The tool supports CityGML 1.0 and 2.0, but not 3.0.

Now I see citydb-tool supports the import and export of CityGML 3.0. However, the 'citydb export help' command doesn't show the possibility of exporting data in KML/COLLADA/glTF format. How to make use of 3D Web Client in this situation?

thomashkolbe commented 4 months ago

Hi there, unfortunately there is no visualisation export in the Open Source code yet. We do not have a funding for implementing this so far. So, any contributions would be welcome here. An option might be the mapping of the new database schema onto database views following the old schema. Then, the current KML/COLLADA/glTF exporter would become usable. We already did some extensive experiments about this, but have not updated that code recently to work with the most recent beta version of the new DB schema.

thomashkolbe commented 4 months ago

It should not be too difficult to get the Open Source software "pg2b3dm" to run on the new DB Schema, but we did not try this yet. Check it here: https://github.com/Geodan/pg2b3dm. It does not support textured models, though.

A second alternative would be to modify the Open source software "py3dtilers" to work with our new DB schema. But since this software has not been created by us, I cannot say how difficult this would be to achieve. Check it here: https://github.com/VCityTeam/py3dtilers. This software also support textures.

A third Open Source alternative could be to use the "plateau-gis-converter", a recently published powerful software that can convert the CityGML models of Japan into many other representations including 3DTiles (and textures). Currently it only supports CityGML V2, but since in Japan they are also moving towards using CityGML 3.0 I would expect that CityGML 3.0 might be supported in the not too far future. Here is the link: https://github.com/MIERUNE/plateau-gis-converter. The web site is in Japanese but can easily be translated directly in the web browser.

clausnagel commented 4 months ago

Just in case commercial solutions are also welcome, my company Virtual City Systems offers tools for converting CityGML 3.0/2.0/1.0 into multiple output formats including 3DTiles (with textures, LoDs, implicit geometries, ...). And our tools already connect to the new 3DCityDB v5 schema.

Also note that citydb-tool is not just a CLI tool but also offers a simple but strong Java API. This API lets you easily connect to the 3DCityDB v5 and load and export feature data. So, this API would be a good starting point for implementing a 3DCityDB to KML/COLLADA/glTF/3DTiles/whatever converter. Any contribution is welcome :-)

Tinn-da commented 4 months ago

Thanks for the advice! I'll check the alternatives.