The default constructor uses a snap_radius of zero (i.e., no snapping).
Convenience constructor that calls set_snap_radius().
For the identity snap function, all vertex pairs are separated by at least snap_radius().
REQUIRES: snap_radius <= SnapFunction::kMaxSnapRadius()
The maximum distance that vertices can move when snapped.
The maximum snap radius is just large enough to support snapping to S2CellId level 0. It is equivalent to 7800km on the Earth's surface.
The maximum distance that the center of an edge can move when snapped. This is slightly larger than "snap_radius" because when a geodesic edge is snapped, the center of the edge moves further than its endpoints.
The guaranteed minimum distance between vertices in the output. This is generally some fraction of "snap_radius".
The guaranteed minimum spacing between edges and non-incident vertices in the output. This is generally some fraction of "snap_radius".
Returns a candidate snap site for the given point. The final vertex locations are a subset of the snap sites returned by this function (spaced at least "min_vertex_separation" apart).
A SnapFunction that snaps every vertex to itself. It should be used when vertices do not need to be snapped to a discrete set of locations (such as E7 lat/lngs), or when maximum accuracy is desired.
If the given "snap_radius" is zero, then all input vertices are preserved exactly. Otherwise, S2Builder merges nearby vertices to ensure that no vertex pair is closer than "snap_radius". Furthermore, vertices are separated from non-incident edges by at least "min_edge_vertex_separation", equal to (0.5 * snap_radius). For example, if the snap_radius is 1km, then vertices will be separated from non-incident edges by at least 500m.