Cesium3DTileset feature selection based on intersection with polygon

Unable to find a way to colour or select the entities that are contained within a polygon. There seems to be a Cesium.pointInsideTriangle but this doesn't cater for a polygon

To highlight all elements of 3D buildings that are contained within a defined building area(polygon). Manual selection of all building components not a scalable solution

Have you tried using the 3D Tiles Styling Language (like in this example https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=3D%20Tiles%20Feature%20Styling.html ) ?

You could use the long/lat properties of your buildings to color anything within a certain area.

I have seen it but can’t see how to check if the entity is within a polygon

Have you tried using the 3D Tiles Styling Language (like in this example https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=3D%20Tiles%20Feature%20Styling.html ) ?

You could use the long/lat properties of your buildings to color anything within a certain area.

Unable to find a way to colour or select the entities that are contained within a polygon. There seems to be a Cesium.pointInsideTriangle but this doesn’t cater for a polygon
To highlight all elements of 3D buildings that are contained within a defined building area(polygon). Manual selection of all building components not a scalable solution

You received this message because you are subscribed to a topic in the Google Groups “cesium-dev” group.

To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/iCluw9oomqA/unsubscribe.

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

VRM Technology
UK Address: Unit 301, Kings Cross Business Centre, 180-186 Kings Cross Road, London, WC1X 9DE
Phone: +44 207 721 5031
Company Number: 08048546
VAT Code: 162645800

Ireland Address: Unit 1.15 NovaUCD, Belfield Innovation Park, Belfield, Dublin 4
Phone: +353 1 525 2710
Company Number: 509261
VAT Code: IE9847215A

Disclaimer:
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

This message is confidential. It may also be privileged or otherwise protected by work product immunity or other legal rules. If you have received it by mistake, please let us know by e-mail reply and delete it from your system; you may not copy this message or disclose its contents to anyone. The integrity and security of this message cannot be guaranteed on the Internet

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of VRM Technology. Finally, the recipient should check this email and any attachments for the presence of viruses. VRM Technology accepts no liability for any damage caused by any virus transmitted by this email

I was suggesting you could use the lat/long conditions to approximate the bounds of your polygon, but it looks like there’s a better way. Note that you can use a custom expression for the color as described here:

https://cesiumjs.org/Cesium/Build/Documentation/Cesium3DTileStyle.html#color

So you could run your own bounds checking algorithm or use something like Turf (http://turfjs.org/) to do it.

If the end goal is only to color the buildings within a polygon or the portions of buildings within a polygon, you can also use Classification Polygons. See here: https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/?src=Classification%20Types.html