org.openjump.core.graph.delauneySimplexInsert
Class DTriangulationForJTS

java.lang.Object
  extended by org.openjump.core.graph.delauneySimplexInsert.DTriangulationForJTS

public class DTriangulationForJTS
extends java.lang.Object

Author:
sstein Use the class to access the delauney trinagulation by L. Paul Chew Methods of the class are modified versions from DelaunayPanel.java in DelaunayAp.java.

Field Summary
 boolean debug
           
 
Constructor Summary
DTriangulationForJTS(java.util.ArrayList pointList)
           
DTriangulationForJTS(java.util.ArrayList pointList, com.vividsolutions.jts.geom.Envelope envelope)
           
 
Method Summary
 void addPoint(double x, double y)
           
 void addPoints(java.util.ArrayList pointList)
           
 java.util.ArrayList drawAllCircles()
          Draw all the empty circles (one for each triangle) of the DT.
 java.util.ArrayList drawAllDelaunay()
          Draw all the Delaunay edges.
 java.util.ArrayList drawAllSites()
          Draw all the sites (i.e., the input points) of the DT.
 java.util.ArrayList drawAllVoronoi()
          Draw all the Voronoi edges.
 DelaunayTriangulation getDelaunayTriangulation()
           
 java.util.ArrayList getInitialSimmplexAsJTSPoints()
           
 com.vividsolutions.jts.geom.Geometry getThiessenBoundingBox()
          the size of the box has been empirically defined to get "undistorted" outer thiessen polygons
 java.util.ArrayList getThiessenPolys()
          Method returns thiessen polygons within a empirically enlarged bounding box around the point set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public boolean debug
Constructor Detail

DTriangulationForJTS

public DTriangulationForJTS(java.util.ArrayList pointList)

DTriangulationForJTS

public DTriangulationForJTS(java.util.ArrayList pointList,
                            com.vividsolutions.jts.geom.Envelope envelope)
Parameters:
pointList -
envelope - the envelope my extend the initial point cloud and result in a larger initial simplex
Method Detail

addPoints

public void addPoints(java.util.ArrayList pointList)

addPoint

public void addPoint(double x,
                     double y)

drawAllDelaunay

public java.util.ArrayList drawAllDelaunay()
Draw all the Delaunay edges.

Returns:
Arraylist with LineString geometries.

drawAllVoronoi

public java.util.ArrayList drawAllVoronoi()
Draw all the Voronoi edges.

Returns:
Arraylist with LineString geometries.

drawAllSites

public java.util.ArrayList drawAllSites()
Draw all the sites (i.e., the input points) of the DT.

Returns:
Arraylist with point geometries.

drawAllCircles

public java.util.ArrayList drawAllCircles()
Draw all the empty circles (one for each triangle) of the DT.

Returns:
Arraylist with polygon geometries.

getDelaunayTriangulation

public DelaunayTriangulation getDelaunayTriangulation()

getInitialSimmplexAsJTSPoints

public java.util.ArrayList getInitialSimmplexAsJTSPoints()
Returns:
the corner points of the initial simplex which is divided into smaller simplexes by the iterative insertion of the point dataset

getThiessenBoundingBox

public com.vividsolutions.jts.geom.Geometry getThiessenBoundingBox()
the size of the box has been empirically defined to get "undistorted" outer thiessen polygons

Returns:
a bounding box necesseray to create the final thiessenpolygons

getThiessenPolys

public java.util.ArrayList getThiessenPolys()
Method returns thiessen polygons within a empirically enlarged bounding box around the point set. Therefore the voronoi edges are polygonized and the intersecting voronoi polygons with the bounding box are calculated. These intersecting thiessen polygons (in the bounding box) are returned.

Note: "thiesen" and "voronoi" is exchangeable.

Returns:
a list of Polygons