Best practice in embedding geo location info in the 3d tiles?

1. A concise explanation of the problem you’re experiencing.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

4. The Cesium version you’re using, your operating system and browser.

Hi,

I’m a beginner in Cesium.

I’m planning to create project that contains an area of buildings which I would like to add to the map using 3d tiles.

I’ve been checking out some of the code samples on sandcastle and others on the internet.

But I couldn’t find a good one that indicates how to best position the b3dm models on the map.

I understand that most of the information goes into the tileset.json file, including concepts like bounding volumes with regions, boxes or spheres / geometricError / refinement etc.

I’ve been reading this “https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/specification

When I’m studying other code samples, I have found a few that contains “properties”, like this following one that was shown as an example in the above link

{
  "asset" : {
    "version": "1.0",
    "tilesetVersion": "e575c6f1-a45b-420a-b172-6449fa6e0a59",
  },
  "properties": {
    "Height": {
      "minimum": 1,
      "maximum": 241.6
    }
  },
  "geometricError": 494.50961650991815,
  "root": {
    "boundingVolume": {
      "region": [
        -0.0005682966577418737,
        0.8987233516605286,
        0.00011646582098558159,
        0.8990603398325034,
        0,
        241.6
      ]
    },
    "geometricError": 268.37878244706053,
    "refine": "ADD",
    "content": {
      "uri": "0/0/0.b3dm",
      "boundingVolume": {
        "region": [
          -0.0004001690908972599,
          0.8988700116775743,
          0.00010096729722787196,
          0.8989625664878067,
          0,
          241.6
        ]
      }
    },
    "children": [..]
  }
}

and in some other samples, in the properties, it has min and max longtitude and latitude.

My immediate reaction is that this might be refering to the location of the model(as when you change bounding volume, it doesnt change location of the model loaded in it)

However, when I tried to change it, it doesnt seem to be functioning as I would expect.

Please, if some one can explain my how this part works.

I’m just trying to use json to locate my models with given longtitude and latitude.

The other thing I found was using transform matrix, but as I understand it, it is one way to moving the model around and changes it shape. Is the transform matrix the one that I should be using to locate models, or are there other things that I haven’t found.

Thank you!

What type of data is your source data? Typically what you’d do is you’d have a set of OBJ or glTF models, and you’d tile them with something like Cesium ion (https://cesium.com/ion/). The coordinates of the models are all in a local reference frame. You can then reposition the tileset to place it at the correct longitude/latitude/height with the tileset location adjuster tool on ion. This works by modifying the transform of the root tile. So you can modify this matrix to position and orient your tileset in the correct location on the globe.

Let me know if that helps! This thread also has an example of what a matrix positioning something on the globe looks like:

https://groups.google.com/d/msg/cesium-dev/OI7354FKMk8/D1ewBIFlEwAJ