Class Polygon

    • Constructor Detail

      • Polygon

        public Polygon()
        Constructor
      • Polygon

        public Polygon​(List<LineString> rings)
        Constructor
        Parameters:
        rings - ring line string list
        Since:
        3.0.0
      • Polygon

        public Polygon​(Polygon polygon)
        Constructor
        Parameters:
        polygon - simple polygon
    • Method Detail

      • fromCoordinates

        public static Polygon fromCoordinates​(List<List<Position>> coordinates)
        Create a polygon from coordinates
        Parameters:
        coordinates - coordinates
        Returns:
        polygon
        Since:
        3.0.0
      • getGeometry

        public Geometry getGeometry()
        Get the simple geometry
        Specified by:
        getGeometry in class Geometry
        Returns:
        simple geometry
      • getCoordinates

        public List<List<Position>> getCoordinates()
        Returns coordinates as a GeoJSON Position list
        Returns:
        the coordinates
      • setCoordinates

        public void setCoordinates​(List<List<Position>> coordinates)
        Sets the coordinates from a GeoJSON Position list
        Parameters:
        coordinates - coordinates
        Since:
        3.0.0
      • getRings

        public List<LineString> getRings()
        Get the rings
        Returns:
        list of ring line strings
        Since:
        3.0.0
      • setRings

        public void setRings​(List<LineString> rings)
        Set the rings
        Parameters:
        rings - list of ring line strings
        Since:
        3.0.0
      • getPolygon

        public Polygon getPolygon()
        Get the simple features polygon
        Returns:
        polygon
        Since:
        3.0.0
      • setPolygon

        public void setPolygon​(Polygon polygon)
        Set the simple features polygon
        Parameters:
        polygon - polygon
        Since:
        3.0.0