I’m trying to style my point clouds by Intensity
the problem is that I don’t know which of my point clouds have it and which don’t. If my point cloud doesn’t have it, and it style my point cloud using the Intensity
variable then Cesium crashes saying
I have two questions:
- Is there a way to avoid this and to fall back on the default point cloud colors if Intensity doesn’t exist?
- If I have the 3DTiles how can I check what attributes it has e.g. temperature, Intensity, Classification etc
Also, (if possible) would anyone be able to provide a 3DTiles dataset that has Intensity?
Thank you!
1 Like
@Michael_Flannery
Thank you for sharing these preliminary details with the community! The core issue here is that we do not know which points in a point cloud have the member Intensity
. I wonder if this is more of a JavaScript issue. Something like this could possibly work.
var hasIntensity = point.hasOwnProperty('Intensity');
If hasIntensity
is true
, then we know point
has this property. What are your thoughts on this? Am I missing something here?
Let me know if you have any other questions or concerns. I am looking forward to learning more about your project.
-Sam
@sam.rothstein I might be missing something here, but I’m styling it like so:
this.tileset.style = new Cesium.Cesium3DTileStyle({color: 'rgb(${Intensity}, ${Intensity}, ${Intensity})'});
Where would I get access to the point
variable?
@Michael_Flannery
Thanks for sharing some more details on your code. It seems like checking if this.tileset.style
has the member Intensity
might make more sense. This can likely be done using the technique I outlined in my last post.
Ultimately, it is somewhat difficult for me to help debug your issue without seeing a more complete version of your code. If my suggestion above does not work, could you please send me a sandcastle demo that showcases what you have so far? Looking forward to learning more.
-Sam