Cesium3DTileset feature selection based on intersection with polygon

165 views
Skip to first unread message

Ronan

unread,
Sep 12, 2018, 11:48:41 AM9/12/18
to cesium-dev
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

Omar Shehata

unread,
Sep 13, 2018, 11:43:15 AM9/13/18
to cesium-dev
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. 

Ronan McNulty

unread,
Sep 13, 2018, 3:07:25 PM9/13/18
to cesiu...@googlegroups.com
I have seen it but can't see how to check if the entity is within a polygon

--
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+...@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

Omar Shehata

unread,
Sep 17, 2018, 10:16:32 AM9/17/18
to cesium-dev
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:


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


On Thursday, September 13, 2018 at 3:07:25 PM UTC-4, Ronan McNulty wrote:
I have seen it but can't see how to check if the entity is within a polygon

On Thu, 13 Sep 2018, 16:43 Omar Shehata, <omar.same...@gmail.com> wrote:
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. 

On Wednesday, September 12, 2018 at 11:48:41 AM UTC-4, Ronan wrote:
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.

ga...@cesium.com

unread,
Sep 17, 2018, 10:26:00 AM9/17/18
to cesium-dev
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
Reply all
Reply to author
Forward
0 new messages