Snaps the vertices and segments of a
Geometry to another Geometry's vertices. A snap distance tolerance is used to control where snapping is performed. Snapping one geometry to another can improve robustness for overlay operations by eliminating nearly-coincident edges (which cause problems during noding and intersection calculation). It can also be used to eliminate artifacts such as narrow slivers, spikes and gores.
Too much snapping can result in invalid topology being created, so the number and location of snapped vertices is decided using heuristics to determine when it is safe to snap. This can result in some potential snaps being omitted, however.
Snaps a geometry to itself. Allows optionally cleaning the result to ensure it is topologically valid (which fixes issues such as topology collapses in polygonal inputs).
Snapping a geometry to itself can remove artifacts such as very narrow slivers, gores and spikes.
Parameters:
geom - geom the geometry to snap
snapTolerance - snapTolerance the snapping tolerance
cleanResult - cleanResult whether the result should be made valid
Snaps the vertices in the component
LineStrings of the source geometry to the vertices of the same geometry. Allows optionally cleaning the result to ensure it is topologically valid (which fixes issues such as topology collapses in polygonal inputs).
Parameters:
snapTolerance - snapTolerance the snapping tolerance
cleanResult - cleanResult whether the result should be made valid