com.vividsolutions.jts.operation.polygonize
Class Polygonizer
java.lang.Object
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.
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:
- Dangles - edges which have one or both ends which are not incident on another edge endpoint
- Cut Edges - edges which are connected at both ends but which do not form part of polygon
- Invalid Ring Lines - edges which form rings which are invalid
(e.g. the component lines contain a self-intersection)
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.
|
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
Polygonizer
public Polygonizer()
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
geomList
- a list of Geometry
s 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
g
- a Geometry
with linework to be polygonized
getCutEdges
public Collection getCutEdges()
Get the list of cut edges found during polygonization.
- a collection of the input which are cut edges
getDangles
public Collection getDangles()
Get the list of dangling lines found during polygonization.
- a collection of the input which are dangles
getInvalidRingLines
public Collection getInvalidRingLines()
Get the list of lines forming invalid rings found during polygonization.
- a collection of the input which form invalid rings
getPolygons
public Collection getPolygons()
Gets the list of polygons formed by the polygonization.