public class LineStringSnapper extends Object
LineString
to a set of target snap vertices.
A snap distance tolerance is used to control where snapping is performed.
The implementation handles empty geometry and empty snap vertex sets.
| Constructor and Description |
|---|
LineStringSnapper(LineString srcPts,
double snapTolerance)
Creates a new snapper using the given points
as source points to be snapped.
|
| Modifier and Type | Method and Description |
|---|---|
static Point |
findSnapForVertex(Point pt,
Point[] snapPts,
double snapTolerance) |
static boolean |
isClosed(LineString pts) |
void |
setAllowSnappingToSourceVertices(boolean allowSnappingToSourceVertices) |
Point[] |
snapTo(Point[] snapPts)
Snaps the vertices and segments of the source LineString
to the given set of snap vertices.
|
public LineStringSnapper(LineString srcPts, double snapTolerance)
srcPts - the points to snapsnapTolerance - the snap tolerance to usepublic static Point findSnapForVertex(Point pt, Point[] snapPts, double snapTolerance)
public static boolean isClosed(LineString pts)
public void setAllowSnappingToSourceVertices(boolean allowSnappingToSourceVertices)
Copyright © 2015 Revolution Systems Inc.. All rights reserved.