PolygonBuilder class
Forms {@link Polygon}s out of a graph of {@link DirectedEdge}s. The edges to use are marked as being in the result Area.
@version 1.7
Constructors
- PolygonBuilder(GeometryFactory geometryFactory)
Properties
- geometryFactory ↔ GeometryFactory
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shellList ↔ List
-
getter/setter pair
Methods
-
add(
List dirEdges, List nodes) → void - Add a set of edges and nodes, which form a graph. The graph is assumed to contain one or more polygons, possibly with holes.
-
addGraph(
PlanarGraph graph) → void - Add a complete graph. The graph is assumed to contain one or more polygons, possibly with holes.
-
buildMaximalEdgeRings(
List dirEdges) → List - for all DirectedEdges in result, form them into MaximalEdgeRings
-
buildMinimalEdgeRings(
List maxEdgeRings, List shellList, List freeHoleList) → List -
computePolygons(
List shellList) → List< Polygon> -
findShell(
List minEdgeRings) → EdgeRing? - This method takes a list of MinimalEdgeRings derived from a MaximalEdgeRing, and tests whether they form a Polygon. This is the case if there is a single shell in the list. In this case the shell is returned. The other possibility is that they are a series of connected holes, in which case no shell is returned.
-
getPolygons(
) → List< Polygon> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
placeFreeHoles(
List shellList, List freeHoleList) → void -
This method determines finds a containing shell for all holes
which have not yet been assigned to a shell.
These "free" holes should
all be properly contained in their parent shells, so it is safe to use the
findEdgeRingContaining
method. (This is the case because any holes which are NOT properly contained (i.e. are connected to their parent shell) would have formed part of a MaximalEdgeRing and been handled in a previous step). -
placePolygonHoles(
EdgeRing shell, List minEdgeRings) → void - This method assigns the holes for a Polygon (formed from a list of MinimalEdgeRings) to its shell. Determining the holes for a MinimalEdgeRing polygon serves two purposes:
-
sortShellsAndHoles(
List edgeRings, List shellList, List freeHoleList) → void - For all rings in the input list, determine whether the ring is a shell or a hole and add it to the appropriate list. Due to the way the DirectedEdges were linked, a ring is a shell if it is oriented CW, a hole otherwise.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
findEdgeRingContaining(
EdgeRing testEr, List shellList) → EdgeRing -
Find the innermost enclosing shell EdgeRing containing the argument EdgeRing, if any.
The innermost enclosing ring is the smallest enclosing ring.
The algorithm used depends on the fact that:
ring A contains ring B iff envelope(ring A) contains envelope(ring B)
This routine is only safe to use if the chosen point of the hole is known to be properly contained in a shell (which is guaranteed to be the case if the hole does not touch its shell)