Hello Community,
I’m encountering an issue while trying to update the color of specific points within a polygon entity in my CesiumJS application. My goal is to target and modify only those points that have a particular classification (e.g., “high vegetation”) and fall inside a user-defined polygon.
Currently, I’m attempting to access the classification property of the tile features using content.getFeature(i)
, but the featuresLength
seems to be zero.
My questions are:
- How can I ensure the Classification property is accessible within the tile features so that
getFeature
can be used effectively? - Is there a more direct or recommended approach to achieve this selective point updating within a polygon? If so, could someone provide a code example illustrating this implementation?
To provide context, I’ve included three screenshots:
- Image 1: Shows the initial point cloud with various classifications (low vegetation, medium vegetation, high vegetation, ground, and building).
- Image 2: Illustrates a drawn connected polyline and a resulting polygon entity.
- Image 3: Demonstrates my current unsuccessful attempt, where all points inside the polygon are updated, rather than just the “high vegetation” points.
Any guidance or code snippets would be greatly appreciated!
Thank you,
Sarah