1. A concise explanation of the problem you're experiencing.
I am trying to understand the different format. What I want is basically like this one => https://cesiumjs.org/NewYork/
You load buildings, you can click on them independently and you can get the general information of that building (height/location)
The New York map is using GML formatting, so each building is a separated element, and with a json they are positioned on map.
The person I work with passed me a single GLTF file, with all buildings (as a block),but I believe I miss the information on it (location\height). https://drive.google.com/file/d/1Ndg5EurB5H7HK7S8lXjOoEQc51dkMIfa/view?usp=sharing
Now, my question is since me, and the person I work with probably understand nothing about this.
- Is it possible from this file, or a single GLTF file, to position the building at different location, and getting individually their information? I believe it is not possible with this file, but it is possible with a single gltf file?
- Do I also need a json ?
- Do I need to create multiple GLTF files separated ?
- Is it better to use another format for this request?
Thank you for your help and time.
So there’s a couple of things you can do here. If you upload that glTF to Cesium ion https://cesium.com/ion and select “3D model”, you can then position them all together on the globe using the tileset location tool. But then you won’t be able to select individual buildings/see information about them.
If you need to be able to see/select individual buildings, you’ll need to either use KML+COLLADA or CityGML for the time being. There’s an example KML+COLLADA building in the getting started:
This way, each building will be its own separate 3D model, and so you can clamp an entire city to the underlying terrain. And when loaded in CesiumJS you’ll be able to click/select individual buildings. Does that make sense?
We are also working on having more options available to allow you to select exactly what type of data you want to include per-building, see: https://github.com/AnalyticalGraphicsInc/cesium-ion-community/issues/132
Thank you for your reply.
I have a little more question In the case I want to store the whole stuff inside my own backend.
Is it possible (technically) to make it work with a combination of json/GLTf ? or the best way is storing a full CityGML and load the 3d models directly?
I’m not a aware of an easy way to render large CityGML in the browser without 3D TIles, but since 3D Tiles uses glTF as the payload, then starting with glTF would be a good choice for loading performance.