Closed nextstopsun closed 7 years ago
The KML/COLLADA/glTF Exporter privides a filter option that allows you to export a single CityGML object according to its GMLID (Please refer to the pages 135-136 of the 3DCityDB-Documentation-3.3). Once the glTF object has been exported, you can simply copy it and replace the old one in your previously created glTF datasets.
@yaozhihang Thanks for a reply. So how do I handle the case when I don't need a glTF file itself, but rather want to generate glTF output directly from the database to other software (i.e. web server) without the additional step of creating and storing files?
Sorry, I've no idea how to handle this case using the 3DCityDB. Since the current version of the KML/COLLADA/glTF Exporter uses the collada2glTF tool to create glTF models, only glTF files can be created.
The importer/exporter tool export can be run from the command line. You can issue a KML/COLLADA/glTF export using the -kmlExport
flag. Filter criteria can be provided as separate configuration file through the -config
parameter. Read more about the command line interface (CLI) in chapter 5.8 of the version 3.3 documentation.
Using the CLI, all you have to do is implement a service interface that would accept a client's request, create a corresponding configuration file, invoke a KML/COLLADA/glTF export and return the glTF output to the client. The overhead of using temporary file remains, but is hidden from the client.
Closing this issue. Feel free to re-open if you have further questions.
Is it possible to create glTF from 3DcityDB on demand? For now we can only export by export tool once in a while. So if data in the database changes, we have to reexport changed models once again.
Ideally it could be a database function that returns glTF-encoded data for a requested object.