Package ucar.nc2.ft2.simpgeometry
Interface Polygon
-
- All Superinterfaces:
SimpleGeometry
- All Known Implementing Classes:
CFPolygon
public interface Polygon extends SimpleGeometry
Generic interface for a Simple Geometry 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 listArray
getData()
Get the data associated with this Polygonboolean
getInteriorRing()
Get whether or not this polygon is an interior ringPolygon
getNext()
Get the next polygon in the sequence of multi-polygonsList<Point>
getPoints()
Get the list of points which constitute the polygon.Polygon
getPrev()
Get the previous polygon in the sequence of multi-polygonsvoid
setData(Array data)
Set the data associated with this Polygonvoid
setInteriorRing(boolean interior)
Simply sets whether or not this polygon is an interior ringvoid
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.-
Methods inherited from interface ucar.nc2.ft2.simpgeometry.SimpleGeometry
getBBLower, getBBUpper
-
-
-
-
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 interfaceSimpleGeometry
- 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 interfaceSimpleGeometry
- 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 residesvariable
- Which holds polygon informationindex
- for Indexing within the polygon variable- Returns:
- the constructed Polygon with associated data
-
-