public class OffsetPointGenerator
extends java.lang.Object
Geometry
.
Can be used to generate probe points for
determining whether a polygonal overlay result
is incorrect.
The input geometry may have any orientation for its rings,
but setSidesToGenerate(boolean, boolean)
is
only meaningful if the orientation is known.Modifier and Type | Field and Description |
---|---|
private boolean |
doLeft |
private boolean |
doRight |
private Geometry |
g |
Constructor and Description |
---|
OffsetPointGenerator(Geometry g) |
Modifier and Type | Method and Description |
---|---|
private void |
computeOffsetPoints(Coordinate p0,
Coordinate p1,
double offsetDistance,
java.util.List offsetPts)
Generates the two points which are offset from the
midpoint of the segment (p0, p1) by the
offsetDistance.
|
private void |
extractPoints(LineString line,
double offsetDistance,
java.util.List offsetPts) |
java.util.List |
getPoints(double offsetDistance)
Gets the computed offset points.
|
void |
setSidesToGenerate(boolean doLeft,
boolean doRight)
Set the sides on which to generate offset points.
|
private Geometry g
private boolean doLeft
private boolean doRight
public OffsetPointGenerator(Geometry g)
public void setSidesToGenerate(boolean doLeft, boolean doRight)
doLeft
- doRight
- public java.util.List getPoints(double offsetDistance)
private void extractPoints(LineString line, double offsetDistance, java.util.List offsetPts)
private void computeOffsetPoints(Coordinate p0, Coordinate p1, double offsetDistance, java.util.List offsetPts)
p0
- the first point of the segment to offset fromp1
- the second point of the segment to offset from