public class BufferInputLineSimplifier
extends java.lang.Object
The most important benefit of doing this is to reduce the number of points and the complexity of shape which will be buffered. It also reduces the risk of gores created by the quantized fillet arcs (although this issue should be eliminated in any case by the offset curve generation logic).
A key aspect of the simplification is that it affects inside (concave or inward) corners only. Convex (outward) corners are preserved, since they are required to ensure that the eventual buffer curve lies at the correct distance from the input geometry.
Another important heuristic used is that the end segments of the input are never simplified. This ensures that the client buffer code is able to generate end caps consistently.
No attempt is made to avoid self-intersections in the output. This is acceptable for use for generating a buffer offset curve, but means that this cannot be used as a general-purpose polygon simplification algorithm.
Constructor and Description |
---|
BufferInputLineSimplifier(Coordinate[] inputLine) |
Modifier and Type | Method and Description |
---|---|
static Coordinate[] |
simplify(Coordinate[] inputLine,
double distanceTol)
Simplify the input coordinate list.
|
Coordinate[] |
simplify(double distanceTol)
Simplify the input coordinate list.
|
public BufferInputLineSimplifier(Coordinate[] inputLine)
public static Coordinate[] simplify(Coordinate[] inputLine, double distanceTol)
inputLine
- the coordinate list to simplifydistanceTol
- simplification distance tolerance to usepublic Coordinate[] simplify(double distanceTol)
distanceTol
- simplification distance tolerance to use