I have a situation where I have geojson data that makes a building footprint. Besides that, I have a GLTF model that represents the building. The problem that I have is to position the .gltf to match the footprint. So I have coordinates from geojson, and have GLTF. I am not sure that pivot of the .gltf is on the same place for every building I have ( That is up to modelers and I can not change that fact ).
I have some ideas:
- To find the bounding box of geojson and .gltf, find the biggest sides of both and try to position the .gltf to match the longest side of the geojson.
- To find somehow angle between magnetic north point and geojson bbox and to apply it on GLTF.
If someone have suggestion how to achieve some of my ideas or have better idea, please give me a hint or some code samples…
This is how it looks now: