Interface Polygon

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addPoint​(double x, double y)
      Add a point to this polygon's points list
      Array getData()
      Get the data associated with this Polygon
      boolean getInteriorRing()
      Get whether or not this polygon is an interior ring
      Polygon getNext()
      Get the next polygon in the sequence of multi-polygons
      List<Point> getPoints()
      Get the list of points which constitute the polygon.
      Polygon getPrev()
      Get the previous polygon in the sequence of multi-polygons
      void setData​(Array data)
      Set the data associated with this Polygon
      void setInteriorRing​(boolean interior)
      Simply sets whether or not this polygon is an interior ring
      void setNext​(Polygon next)
      Sets the next polygon which make up the multipolygon which this polygon is a part of.
      void setPrev​(Polygon prev)
      Sets the previous polygon which makes up the multipolygon which this polygon is a part of.
      Polygon setupPolygon​(NetcdfDataset dataset, Variable variable, int index)
      Given a dataset, construct a polygon from the variable which holds polygons and the index as given.
    • Method Detail

      • getPoints

        List<Point> getPoints()
        Get the list of points which constitute the polygon.
        Returns:
        points Points which constitute the polygon
      • getData

        Array getData()
        Get the data associated with this Polygon
        Specified by:
        getData in interface SimpleGeometry
        Returns:
        data Data series associated with the Polygon
      • getNext

        Polygon getNext()
        Get the next polygon in the sequence of multi-polygons
        Returns:
        Next polygon in the same multipolygon if any, otherwise null
      • getPrev

        Polygon getPrev()
        Get the previous polygon in the sequence of multi-polygons
        Returns:
        Previous polygon in the same multipolygon if any, otherwise null
      • getInteriorRing

        boolean getInteriorRing()
        Get whether or not this polygon is an interior ring
        Returns:
        true if an interior ring, false if not
      • addPoint

        void addPoint​(double x,
                      double y)
        Add a point to this polygon's points list
      • setData

        void setData​(Array data)
        Set the data associated with this Polygon
        Specified by:
        setData in interface SimpleGeometry
        Parameters:
        data - Array of data to set to
      • setNext

        void setNext​(Polygon next)
        Sets the next polygon which make up the multipolygon which this polygon is a part of.
        Parameters:
        next - Polygon to set
      • setPrev

        void setPrev​(Polygon prev)
        Sets the previous polygon which makes up the multipolygon which this polygon is a part of.
        Parameters:
        prev - Polygon to set
      • setInteriorRing

        void setInteriorRing​(boolean interior)
        Simply sets whether or not this polygon is an interior ring
        Parameters:
        interior - ring or not
      • setupPolygon

        Polygon setupPolygon​(NetcdfDataset dataset,
                             Variable variable,
                             int index)
        Given a dataset, construct a polygon from the variable which holds polygons and the index as given.
        Parameters:
        dataset - Where the polygon variable resides
        variable - Which holds polygon information
        index - for Indexing within the polygon variable
        Returns:
        the constructed Polygon with associated data