public class Polygonizer extends Object
Geometry
s 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:
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
Polygonizer()
Create a polygonizer with the same
GeometryFactory
as the input Geometry s |
Modifier and Type | Method and Description |
---|---|
void |
add(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. |
Collection |
getCutEdges()
Gets the list of cut edges found during polygonization.
|
Collection |
getDangles()
Gets the list of dangling lines found during polygonization.
|
Collection |
getInvalidRingLines()
Gets the list of lines forming invalid rings found during polygonization.
|
Collection |
getPolygons()
Gets the list of polygons formed by the polygonization.
|
protected com.vividsolutions.jts.operation.polygonize.PolygonizeGraph graph
protected Collection dangles
protected List cutEdges
protected List invalidRingLines
protected List holeList
protected List shellList
protected List polyList
public Polygonizer()
GeometryFactory
as the input Geometry
spublic void add(Collection geomList)
geomList
- a list of Geometry
s with linework to be polygonizedpublic void add(Geometry g)
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 usedg
- a Geometry
with linework to be polygonizedpublic Collection getPolygons()
Polygon
spublic Collection getDangles()
LineString
s which are danglespublic Collection getCutEdges()
LineString
s which are cut edgespublic Collection getInvalidRingLines()
LineString
s which form invalid ringsCopyright © 2014. All rights reserved.