-
I like the efficiency of the S2ContainsPointQuery. Is there a similar option for checking if an edge is contained (line segment between two points)? What would be the most efficient way to make many of these checks (independently) against a single S2ShapeIndex? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Would you want to check if an edge is contained in a polygon or another line string? For the former, you could just check that one of the vertices is contained and that the edge doesn't cross any other edges with S2CrossingEdgeQuery, and for the latter just check that both vertices belong to the line string and that they're adjacent. If you want generic containment capabilities, I think S2BooleanOperation is your best best. |
Beta Was this translation helpful? Give feedback.
-
It should give the same answers since it uses the same crossing edge predicates. To clarify you'll have to do a two step process:
|
Beta Was this translation helpful? Give feedback.
It should give the same answers since it uses the same crossing edge predicates. To clarify you'll have to do a two step process: