Class PolygonHoleJoiner

java.lang.Object
org.locationtech.jts.triangulate.polygon.PolygonHoleJoiner

public class PolygonHoleJoiner extends Object
Transforms a polygon with holes into a single self-touching (invalid) ring by joining holes to the exterior shell or to another hole. The holes are added from the lowest upwards. As the resulting shell develops, a hole might be added to what was originally another hole.

There is no attempt to optimize the quality of the join lines. In particular, a hole which already touches at a vertex may be joined at a different vertex.

  • Constructor Details

    • PolygonHoleJoiner

      public PolygonHoleJoiner(Polygon inputPolygon)
  • Method Details

    • joinAsPolygon

      public static Polygon joinAsPolygon(Polygon inputPolygon)
    • join

      public static Coordinate[] join(Polygon inputPolygon)
    • compute

      public Coordinate[] compute()
      Computes the joined ring.
      Returns:
      the points in the joined ring