Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

may i know if this quantized-mesh tiles has “metadata” extension? #43

Open
zhangiser opened this issue Aug 11, 2022 · 4 comments
Open

Comments

@zhangiser
Copy link

Hi there
I'm not a python programmer,this is my first meet python tools.I used CTB before to generate quantized-mesh.But there may have some bugs.Because the CesiumJS not only need layer.json but also need metadata extension in 0/0/0.terrain and 0/1/0.terrain and every tile in level10 to init the availbility.We can trace the code at Cesium Source Code.

This rule can be find by Cesium World Terrain which provide by Cesium ion.

So I'm looking for a new tools to generate the quantized-mesh tiles
,and my problem is does the tiles created by this python tools has metadata extension in 0/0/0.terrain and 0/1/0.terrain and every tile in level10 ?

Best,zhangiser

@loicgasser
Copy link
Owner

loicgasser commented Sep 9, 2022

This library doesn't handle the generation of the layer.json. Looking at the code you linked if you don't define metadataAvailability it will just use available which is what you want.
Now if you are referring to the metadata extension in the tile (https://github.com/CesiumGS/quantized-mesh#metadata)
this library doesn't support it. It has only water mask and lightning.
I suspect you can configure your client to tell Cesium that your tiles don't have any metadata.

@zhangiser
Copy link
Author

maybe you are right,i'll try it later.and i'm curious about why there has no metadata extension in your quantized mesh,but cesium terrain layer could still work well?

@loicgasser
Copy link
Owner

metadata extension in the terrain tile is optional. It is there to store extra arbitrary data, not used directly by Cesium to do any of the terrain rendering.

@zhangiser
Copy link
Author

@loicgasser

metadata extension in the terrain tile is optional. It is there to store extra arbitrary data, not used directly by Cesium to do any of the terrain rendering.

I used Ceisum World Terrain from Cesium ion as a test,there has some problems.I set the requestMetadata:false

      Cesium.Ion.defaultAccessToken = "some token"
      var terrainProvider = new Cesium.CesiumTerrainProvider({
        url : Cesium.IonResource.fromAssetId(1),
        requestVertexNormals : false,
        requestWaterMask : false,
        requestMetadata:false,
      })
      viewer.terrainProvider=terrainProvider;

When i tracked from chrome network,found there only requested 0/0/0.terrain and 0/1/0.terrain,then continue to zoom in,the terrain layer doesn't request terrain tile anymore,so terrain is not shown in the map,If set requestMetadata:true,then everything is ok,we can see terrain in the map again.
So,i guess metadata is not optional,it's required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants