Package mil.nga.sf

Class MultiPolygon

  • All Implemented Interfaces:
    Serializable

    public class MultiPolygon
    extends MultiSurface<Polygon>
    A restricted form of MultiSurface where each Surface in the collection must be of type Polygon.
    Author:
    osbornb
    See Also:
    Serialized Form
    • Constructor Detail

      • MultiPolygon

        public MultiPolygon()
        Constructor
      • MultiPolygon

        public MultiPolygon​(boolean hasZ,
                            boolean hasM)
        Constructor
        Parameters:
        hasZ - has z
        hasM - has m
      • MultiPolygon

        public MultiPolygon​(List<Polygon> polygons)
        Constructor
        Parameters:
        polygons - list of polygons
      • MultiPolygon

        public MultiPolygon​(Polygon polygon)
        Constructor
        Parameters:
        polygon - polygon
      • MultiPolygon

        public MultiPolygon​(MultiPolygon multiPolygon)
        Copy Constructor
        Parameters:
        multiPolygon - multi polygon to copy
    • Method Detail

      • getPolygons

        public List<Polygon> getPolygons()
        Get the polygons
        Returns:
        polygons
      • setPolygons

        public void setPolygons​(List<Polygon> polygons)
        Set the polygons
        Parameters:
        polygons - polygons
      • addPolygon

        public void addPolygon​(Polygon polygon)
        Add a polygon
        Parameters:
        polygon - polygon
      • addPolygons

        public void addPolygons​(List<Polygon> polygons)
        Add polygons
        Parameters:
        polygons - polygons
      • numPolygons

        public int numPolygons()
        Get the number of polygons
        Returns:
        number of polygons
      • getPolygon

        public Polygon getPolygon​(int n)
        Returns the Nth polygon
        Parameters:
        n - nth polygon to return
        Returns:
        polygon