com.vividsolutions.jts.operation.polygonize

Class Polygonizer


public class Polygonizer
extends java.lang.Object

Polygonizes a set of Geometrys which contain linework that represents the edges of a planar graph. Any dimension of Geometry is handled - the constituent linework is extracted to form the edges. The edges must be correctly noded; that is, they must only meet at their endpoints. The Polygonizer will still run on incorrectly noded input but will not form polygons from incorrected noded edges.

The Polygonizer reports the follow kinds of errors:

Version:
1.7

Field Summary

protected List
cutEdges
protected Collection
dangles
protected com.vividsolutions.jts.operation.polygonize.PolygonizeGraph
graph
protected List
holeList
protected List
invalidRingLines
protected List
polyList
protected List
shellList

Constructor Summary

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

Method Summary

void
add(Collection geomList)
Add a collection of geometries to be polygonized.
void
add(Geometry g)
Add a geometry to the linework to be polygonized.
Collection
getCutEdges()
Get the list of cut edges found during polygonization.
Collection
getDangles()
Get the list of dangling lines found during polygonization.
Collection
getInvalidRingLines()
Get the list of lines forming invalid rings found during polygonization.
Collection
getPolygons()
Gets the list of polygons formed by the polygonization.

Field Details

cutEdges

protected List cutEdges

dangles

protected Collection dangles

graph

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

holeList

protected List holeList

invalidRingLines

protected List invalidRingLines

polyList

protected List polyList

shellList

protected List shellList

Constructor Details

Polygonizer

public Polygonizer()

Method Details

add

public void add(Collection geomList)
Add a collection of geometries 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 linework 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

getCutEdges

public Collection getCutEdges()
Get the list of cut edges found during polygonization.
Returns:
a collection of the input which are cut edges

getDangles

public Collection getDangles()
Get the list of dangling lines found during polygonization.
Returns:
a collection of the input which are dangles

getInvalidRingLines

public Collection getInvalidRingLines()
Get the list of lines forming invalid rings found during polygonization.
Returns:
a collection of the input which form invalid rings

getPolygons

public Collection getPolygons()
Gets the list of polygons formed by the polygonization.
Returns:
a collection of Polygons