com.vividsolutions.jts.operation.overlay

Class PolygonBuilder


public class PolygonBuilder
extends java.lang.Object

Forms Polygons out of a graph of DirectedEdges. The edges to use are marked as being in the result Area.

Version:
1.6

Constructor Summary

PolygonBuilder(GeometryFactory geometryFactory, CGAlgorithms cga)

Method Summary

void
add(Collection dirEdges, Collection nodes)
Add a set of edges and nodes, which form a graph.
void
add(PlanarGraph graph)
Add a complete graph.
boolean
containsPoint(Coordinate p)
Checks the current set of shells (with their associated holes) to see if any of them contain the point.
List
getPolygons()

Constructor Details

PolygonBuilder

public PolygonBuilder(GeometryFactory geometryFactory,
                      CGAlgorithms cga)

Method Details

add

public void add(Collection dirEdges,
                Collection nodes)
Add a set of edges and nodes, which form a graph. The graph is assumed to contain one or more polygons, possibly with holes.

add

public void add(PlanarGraph graph)
Add a complete graph. The graph is assumed to contain one or more polygons, possibly with holes.

containsPoint

public boolean containsPoint(Coordinate p)
Checks the current set of shells (with their associated holes) to see if any of them contain the point.

getPolygons

public List getPolygons()