public class ConformingDelaunayTriangulationBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Geometry |
constraintLines |
private java.util.Map |
constraintVertexMap |
private java.util.Collection |
siteCoords |
private QuadEdgeSubdivision |
subdiv |
private double |
tolerance |
Constructor and Description |
---|
ConformingDelaunayTriangulationBuilder() |
Modifier and Type | Method and Description |
---|---|
private void |
create() |
private static java.util.List |
createConstraintSegments(Geometry geom) |
private static void |
createConstraintSegments(LineString line,
java.util.List constraintSegs) |
private java.util.List |
createSiteVertices(java.util.Collection coords) |
private void |
createVertices(Geometry geom) |
Geometry |
getEdges(GeometryFactory geomFact)
Gets the edges of the computed triangulation as a
MultiLineString . |
QuadEdgeSubdivision |
getSubdivision()
Gets the QuadEdgeSubdivision which models the computed triangulation.
|
Geometry |
getTriangles(GeometryFactory geomFact)
Gets the faces of the computed triangulation as a
GeometryCollection
of Polygon . |
void |
setConstraints(Geometry constraintLines)
Sets the linear constraints to be conformed to.
|
void |
setSites(Geometry geom)
Sets the sites (point or vertices) which will be triangulated.
|
void |
setTolerance(double tolerance)
Sets the snapping tolerance which will be used
to improved the robustness of the triangulation computation.
|
private java.util.Collection siteCoords
private Geometry constraintLines
private double tolerance
private QuadEdgeSubdivision subdiv
private java.util.Map constraintVertexMap
public ConformingDelaunayTriangulationBuilder()
public void setSites(Geometry geom)
geom
- the geometry from which the sites will be extracted.public void setConstraints(Geometry constraintLines)
constraintLines
- the lines to constraint topublic void setTolerance(double tolerance)
tolerance
- the tolerance distance to useprivate void create()
private java.util.List createSiteVertices(java.util.Collection coords)
private void createVertices(Geometry geom)
private static java.util.List createConstraintSegments(Geometry geom)
private static void createConstraintSegments(LineString line, java.util.List constraintSegs)
public QuadEdgeSubdivision getSubdivision()
public Geometry getEdges(GeometryFactory geomFact)
MultiLineString
.geomFact
- the geometry factory to use to create the outputpublic Geometry getTriangles(GeometryFactory geomFact)
GeometryCollection
of Polygon
.geomFact
- the geometry factory to use to create the output