Command line converter of CityGML (.gml) to OBJ (.obj) files. This project is at an early stage and is currently being further developed.
--input your-input-citygml-path-here
--output your-output-obj-path-here
Please make sure to use the absolute paths to the respective directories.
- This project makes use of the ecitygml Rust-library.
- Every building will be converted into a set of
.objfiles each representing exactly one polygon. - Every polygon will be triangulated with the earcut Rust-library and will be written into an individual
.obj - Every
.objfiles adheres to the following naming convention:<gml_id_of the polygon>.obj.
| Optional feature | specification |
|---|---|
| Building-wise translation into local CRS before the triangulation | --tbw |
Adding small triangular structures indicating the building-wise, axis-aligned bounding box to each of the resulting .obj files. |
--add_bb |
For every .obj file, write out an additional .json file contaiing metadata such as gml_id, thematic role, and the translation parameters that were applied, in case a translation into a local CRS was performed before the triangulation |
--add-json |
Grouping of the output by semantic role (e.g. wallSurfaces or roofSurfaces) into combined .obj files. |
--group-sc |
- extending the functionality to more parts of the CityGML 3.0 data model
- implementing a functionality to convert every thematic surface into one single
.objfile. - implementing a functionality to convert the entire building into one single
.objfile. - imorting an external bounding box
- CityGML 3.0 (In case you have an older CityGML version, you can e.g. use the citygml-tools to upgrade your files)
- Files must end with
.gml,.GML,.xml, or.XML - Your files must be valid (e.g., free check with CityDoctor)
- Only Buildings are supported.
- CityGML 1.0 and 2.0 are not supported
- Only RoofSurfaces, WallSurfaces, GroundSurfaces, WindowSurfaces and DoorSurfaces are currently suppported.
- Building Installations are not supportes
- Implicit geometry is not Supported
Feel free to open a discussion under Issues or write us an email