Loading Point Cloud Layers in Cesium Clients
To load your point cloud layer in a Cesium client using Cesium API:
1. Add a Cesium3DTileset element:
var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: "https://www.skylineglobe.com/SG/pnts/1725996/tileset.json"
}));
2. Use the following path format for the layer to load:
https://[ServerName]/sg/pnts/[LayerID]/tileset.json
E.g., https://www.skylineglobe.com/SG/pnts/1725996/tileset.json
Example:
var viewer = new Cesium.Viewer("cesiumContainer");
var tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: "https://www.skylineglobe.com/SG/pnts/1725996/tileset.json"
}));
tileset.readyPromise.then(function(tileset) {
viewer.camera.flyToBoundingSphere(tileset.boundingSphere);
});
Note: You can also interactively browse, edit and run this code example in Cesium Sandcastle.
3. If you want to define how to handle the point cloud's elevation values, append the vertical datum (vdatum) parameter to the end of your 3D Tile URL. The vdatum parameter can have either of the following values:
§ convert_z: Reproject to ellipsoid (as required by the OGC 3D Tiles standard) for compatibility with terrain that uses true ellipsoid elevation.
§ copy_z: Maintain elevation values as geoid, while declaring them as ellipsoid.
Note: Most input coordinate systems and terrain data, including MPT, use geoid elevation values even though they are declared as ellipsoid when delivered to TE4W/Cesium, and thus they are actually compatible without reprojection.
Use the following format:
?vdatum=[reprojection value: either copy_z. OR convert_z]
E.g., https://www.skylineglobe.com/SG/pnts/2925566/tileset.json?vdatum=copy_z