S2ClosestEdgeQuery is a helper class for finding the closest edge(s) to a given point, edge, S2Cell, or geometry collection. For example, given a set of polylines, the following code efficiently finds the closest 5 edges to a query point:
See Source File