Class PolygonHelper



  • public class PolygonHelper
    extends Object
    Various utility methods concerning polygons.
    • Constructor Detail

      • PolygonHelper

        public PolygonHelper()
    • Method Detail

      • polygonFromLinearRing

        public static Polygon polygonFromLinearRing(LinearRing shell,
                                                    GeometryFactory factory)
        Convenience method for creating a simple polygon from a shell without holes.
        Parameters:
        shell - the outline of the polygon.
        factory - the factory to use.
        Returns:
        the constructed polygon.
      • multipolygonFromRings

        public static MultiPolygon multipolygonFromRings(Set<LinearRing> rings,
                                                         boolean checkValid)
        Given a set of LinearRings, create Multipolygon. Therefore figure out which rings are nested in other rings to build up the topology of the rings and correctly construct the multipolygon consisting of possibly several polygons with holes.
        Parameters:
        rings - the set of linear rings.
        Returns:
        the newly created JTS-instance.