Class SnapTransformer
java.lang.Object
org.locationtech.jts.geom.util.GeometryTransformer
org.locationtech.jts.operation.overlay.snap.SnapTransformer
-
Field Summary
FieldsFields inherited from class org.locationtech.jts.geom.util.GeometryTransformer
factory
-
Constructor Summary
ConstructorsConstructorDescriptionSnapTransformer
(double snapTolerance, Coordinate[] snapPts) SnapTransformer
(double snapTolerance, Coordinate[] snapPts, boolean isSelfSnap) -
Method Summary
Modifier and TypeMethodDescriptionprivate Coordinate[]
snapLine
(Coordinate[] srcPts, Coordinate[] snapPts) protected CoordinateSequence
transformCoordinates
(CoordinateSequence coords, Geometry parent) Transforms aCoordinateSequence
.Methods inherited from class org.locationtech.jts.geom.util.GeometryTransformer
copy, createCoordinateSequence, getInputGeometry, transform, transformGeometryCollection, transformLinearRing, transformLineString, transformMultiLineString, transformMultiPoint, transformMultiPolygon, transformPoint, transformPolygon
-
Field Details
-
snapTolerance
private double snapTolerance -
snapPts
-
isSelfSnap
private boolean isSelfSnap
-
-
Constructor Details
-
SnapTransformer
SnapTransformer(double snapTolerance, Coordinate[] snapPts) -
SnapTransformer
SnapTransformer(double snapTolerance, Coordinate[] snapPts, boolean isSelfSnap)
-
-
Method Details
-
transformCoordinates
Description copied from class:GeometryTransformer
Transforms aCoordinateSequence
. This method should always return a valid coordinate list for the desired result type. (E.g. a coordinate list for a LineString must have 0 or at least 2 points). If this is not possible, return an empty sequence - this will be pruned out.- Overrides:
transformCoordinates
in classGeometryTransformer
- Parameters:
coords
- the coordinates to transformparent
- the parent geometry- Returns:
- the transformed coordinates
-
snapLine
-