how to find number of contour lines intersecting with plotted polygon

**I have gone through the cesium API’s to find number of contour lines intersecting with the polygon line. But am not able to achieve that… **

Can someone give any idea, how can i know no.of lines intersecting with the polygon line…

Need partial code of its implementaion…

Hey Madar,

I don’t think there’s anything built-in to CesiumJS to do this. How are the lines constructed? If you have all the segments, you can try iterating over them (as an array or perhaps as a spatial data structure for efficiency) and implement something like a line-line intersection test.

Best of luck!

This class might also be helpful: https://cesiumjs.org/Cesium/Build/Documentation/IntersectionTests.html