Class PolygonHoleJoiner


  • public class PolygonHoleJoiner
    extends java.lang.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 Detail

      • PolygonHoleJoiner

        public PolygonHoleJoiner​(Polygon inputPolygon)
    • Method Detail

      • joinAsPolygon

        public static Polygon joinAsPolygon​(Polygon inputPolygon)
      • compute

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