geos::operation::overlay::snap::GeometrySnapper Class Reference
Snaps the vertices and segments of a Geometry to another Geometry's vertices.
More...
#include <GeometrySnapper.h>
List of all members.
Detailed Description
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). 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.
Constructor & Destructor Documentation
geos::operation::overlay::snap::GeometrySnapper::GeometrySnapper |
( |
const geom::Geometry & |
g |
) |
[inline] |
Creates a new snapper acting on the given geometry
- Parameters:
-
Member Function Documentation
static double geos::operation::overlay::snap::GeometrySnapper::computeOverlaySnapTolerance |
( |
const geom::Geometry & |
g |
) |
[static] |
Estimates the snap tolerance for a Geometry, taking into account its precision model.
- Parameters:
-
- Returns:
- the estimated snap tolerance
static void geos::operation::overlay::snap::GeometrySnapper::snap |
( |
const geom::Geometry & |
g0, |
|
|
const geom::Geometry & |
g1, |
|
|
double |
snapTolerance, |
|
|
geom::GeomPtrPair & |
ret | |
|
) |
| | [static] |
Snaps two geometries together with a given tolerance.
- Parameters:
-
| g0 | a geometry to snap |
| g1 | a geometry to snap |
| snapTolerance | the tolerance to use |
| ret | the snapped geometries as a pair of auto_ptrs (output parameter) |
Snaps the vertices in the component LineStrings of the source geometry to the vertices of the given snap geometry with a given snap tolerance.
- Parameters:
-
| g | a geometry to snap the source to |
| snapTolerance | |
- Returns:
- a new snapped Geometry
std::auto_ptr<geom::Geometry> geos::operation::overlay::snap::GeometrySnapper::snapToSelf |
( |
double |
snapTolerance, |
|
|
bool |
cleanResult | |
|
) |
| | |
Snaps the vertices in the component LineStrings of the source geometry to the vertices of itself with a given snap tolerance and optionally cleaning the result.
- Parameters:
-
| snapTolerance | |
| cleanResult | clean the result |
- Returns:
- a new snapped Geometry
The documentation for this class was generated from the following file: