JTS Topology Suite version 1.12

com.vividsolutions.jts.operation.polygonize
Class Polygonizer

java.lang.Object
  extended by com.vividsolutions.jts.operation.polygonize.Polygonizer

public class Polygonizer
extends java.lang.Object

Polygonizes a set of Geometrys which contain linework that represents the edges of a planar graph. All types of Geometry are accepted as input; the constituent linework is extracted as the edges to be polygonized. The processed edges must be correctly noded; that is, they must only meet at their endpoints. The Polygonizer will run on incorrectly noded input but will not form polygons from non-noded edges, and will report them as errors.

The Polygonizer reports the follow kinds of errors:

Version:
1.7

Field Summary
protected  java.util.List cutEdges
           
protected  java.util.Collection dangles
           
protected  com.vividsolutions.jts.operation.polygonize.PolygonizeGraph graph
           
protected  java.util.List holeList
           
protected  java.util.List invalidRingLines
           
protected  java.util.List polyList
           
protected  java.util.List shellList
           
 
Constructor Summary
Polygonizer()
          Create a polygonizer with the same GeometryFactory as the input Geometrys
 
Method Summary
 void add(java.util.Collection geomList)
          Adds a collection of geometries to the edges to be polygonized.
 void add(Geometry g)
          Add a Geometry to the edges to be polygonized.
 java.util.Collection getCutEdges()
          Gets the list of cut edges found during polygonization.
 java.util.Collection getDangles()
          Gets the list of dangling lines found during polygonization.
 java.util.Collection getInvalidRingLines()
          Gets the list of lines forming invalid rings found during polygonization.
 java.util.Collection getPolygons()
          Gets the list of polygons formed by the polygonization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

graph

protected com.vividsolutions.jts.operation.polygonize.PolygonizeGraph graph

dangles

protected java.util.Collection dangles

cutEdges

protected java.util.List cutEdges

invalidRingLines

protected java.util.List invalidRingLines

holeList

protected java.util.List holeList

shellList

protected java.util.List shellList

polyList

protected java.util.List polyList
Constructor Detail

Polygonizer

public Polygonizer()
Create a polygonizer with the same GeometryFactory as the input Geometrys

Method Detail

add

public void add(java.util.Collection geomList)
Adds a collection of geometries to the edges to be polygonized. May be called multiple times. Any dimension of Geometry may be added; the constituent linework will be extracted and used.

Parameters:
geomList - a list of Geometrys with linework to be polygonized

add

public void add(Geometry g)
Add a Geometry to the edges to be polygonized. May be called multiple times. Any dimension of Geometry may be added; the constituent linework will be extracted and used

Parameters:
g - a Geometry with linework to be polygonized

getPolygons

public java.util.Collection getPolygons()
Gets the list of polygons formed by the polygonization.

Returns:
a collection of Polygons

getDangles

public java.util.Collection getDangles()
Gets the list of dangling lines found during polygonization.

Returns:
a collection of the input LineStrings which are dangles

getCutEdges

public java.util.Collection getCutEdges()
Gets the list of cut edges found during polygonization.

Returns:
a collection of the input LineStrings which are cut edges

getInvalidRingLines

public java.util.Collection getInvalidRingLines()
Gets the list of lines forming invalid rings found during polygonization.

Returns:
a collection of the input LineStrings which form invalid rings

JTS Topology Suite version 1.12