1. A concise explanation of the problem you’re experiencing.
I have tried representing regionally gridded precipitation data as a PointCloud in .pnts format both coloring it using RGB values and by using a Batch Table with no RGB and then trying to style off the Batch Table property.
The points display, but they do not accept any of the 3DTileStyle modifiers that I apply to them.
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
For version with RGB values and no Batch Table (IMERGtest.pnts):
viewer = new Cesium.Viewer(‘cesiumContainer’,{
geocoder: false,
homeButton: false,
baseLayerPicker: false,
animation: false,
sceneModePicker: false,
imageryProvider: new Cesium.ArcGisMapServerImageryProvider({
url: “https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/”,
enablePickFeatures: false
})
});
tilesets = ;
for (var q=0;q<144;q++) {
tilesets.push(viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: ‘…/include/imergPnts/’+q+’/’,
shadows: Cesium.ShadowMode.DISABLED,
style: new Cesium.Cesium3DTileStyle({
/color: {
conditions: [
[’{precRate} >= 20','color("red")'],
['{precRate} >= 10’,‘color(“green”)’],
[‘true’,‘color(“blue”)’]
]
},/
pointSize: 1.0,
scaleByDistance: ‘vec4(1e5,5.0,1.2e7,0.3)’
})
})));
}
For version without RGB values and with BatchTable (IMERGtestBT.pnts), just remove the comments surrounding the “color” field.
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
Testing out using Point Clouds to visualize gridded data more efficiently than PointPrimitives
4. The Cesium version you’re using, your operating system and browser.
Cesium 1.42; Centos 6; Firefox 52.6.0
IMERGtest.pnts (829 KB)
IMERGtestBR.pnts (884 KB)
tileset.json (185 Bytes)