Class FastPolygonizer

java.lang.Object
micycle.pgs.commons.FastPolygonizer

public class FastPolygonizer extends Object
This class solves the problem of finding polygons formed by a collection of edges.

At least twice as fast as JTS' polygonizer.

Author:
Michael Carleton
  • Method Details

    • polygonize

      public static processing.core.PShape polygonize(Collection<PEdge> edges)
      Polygonizes a set of edges which represent linework that forms some polygonal arrangement (a planar graph).
      Parameters:
      edges - a collection of NODED (i.e. non intersecting / must only meet at their endpoints) edges. The collection can contain duplicates.
      Returns:
      a GROUP PShape, where each child shape represents a polygon face formed by the edges input