Class SnapTransformer
- java.lang.Object
-
- org.locationtech.jts.geom.util.GeometryTransformer
-
- org.locationtech.jts.operation.overlay.snap.SnapTransformer
-
class SnapTransformer extends GeometryTransformer
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
isSelfSnap
private Coordinate[]
snapPts
private double
snapTolerance
-
Fields inherited from class org.locationtech.jts.geom.util.GeometryTransformer
factory
-
-
Constructor Summary
Constructors Constructor Description SnapTransformer(double snapTolerance, Coordinate[] snapPts)
SnapTransformer(double snapTolerance, Coordinate[] snapPts, boolean isSelfSnap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private 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 Detail
-
snapTolerance
private double snapTolerance
-
snapPts
private Coordinate[] snapPts
-
isSelfSnap
private boolean isSelfSnap
-
-
Constructor Detail
-
SnapTransformer
SnapTransformer(double snapTolerance, Coordinate[] snapPts)
-
SnapTransformer
SnapTransformer(double snapTolerance, Coordinate[] snapPts, boolean isSelfSnap)
-
-
Method Detail
-
transformCoordinates
protected CoordinateSequence transformCoordinates(CoordinateSequence coords, Geometry parent)
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
private Coordinate[] snapLine(Coordinate[] srcPts, Coordinate[] snapPts)
-
-