Closed jievince closed 3 years ago
Use S2ClosestEdgeQuery
. If you search for "distance" in s2polygon.h
, you'll find this:
https://github.com/google/s2geometry/blob/master/src/s2/s2polygon.h#L797
// For example, to measure the distance from one S2Polygon to another, you
// can write:
// S2ClosestEdgeQuery query(&polygon1.index());
// S2ClosestEdgeQuery::ShapeIndexTarget target(&polygon2.index());
// S1ChordAngle distance = query.GetDistance(&target);
Thanks!
These methods are missed in S2