public class CFPolygon extends java.lang.Object implements Polygon
| Constructor and Description |
|---|
CFPolygon()
Constructs an empty polygon with nothing in it using an Array List.
|
CFPolygon(java.util.List<Point> points)
Constructs a new polygon whose points constitute the points passed in.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPoint(double x,
double y)
Add a point to this polygon's points list
|
double[] |
getBBLower()
Gets the lower bounding box coordinate on the polygon.
|
double[] |
getBBUpper()
Gets the upper bounding box coordinate on the polygon.
|
Array |
getData()
Get the data associated with this Polygon
|
GeometryType |
getGeometryType()
Get the geometry the data is associated with.
|
boolean |
getInteriorRing()
Get whether or not this polygon is an interior ring
|
Polygon |
getNext()
Get the next polygon in the sequence of multi-polygons
|
java.util.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)
Sets whether or not this polygon is an interior ring.
|
protected void |
setNext(CFPolygon next)
Sets the next polygon which make up the multipolygon which this polygon is a part of.
|
void |
setNext(Polygon next)
Sets the next polygon which make up the multipolygon which this polygon is a part of.
|
void |
setPrev(CFPolygon prev)
Sets the previous polygon which makes 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 polyvar,
int index)
Given a dataset, variable and index, automatically sets up a previously constructed polygon.
|
public CFPolygon()
public CFPolygon(java.util.List<Point> points)
points - which make up the Polygonpublic GeometryType getGeometryType()
public java.util.List<Point> getPoints()
public Array getData()
getData in interface PolygongetData in interface SimpleGeometrypublic Polygon getNext()
public Polygon getPrev()
public boolean getInteriorRing()
getInteriorRing in interface Polygonpublic void addPoint(double x,
double y)
public void setData(Array data)
setData in interface PolygonsetData in interface SimpleGeometrydata - - array of data to set topublic void setNext(Polygon next)
protected void setNext(CFPolygon next)
public void setPrev(Polygon prev)
public void setPrev(CFPolygon prev)
public void setInteriorRing(boolean interior)
setInteriorRing in interface Polygoninterior - ring or notpublic Polygon setupPolygon(NetcdfDataset dataset, Variable polyvar, int index)
setupPolygon in interface Polygondataset - which the variable is a part ofpolyvar - the variable which has a geometry attributeindex - of the polygon within the variablepublic double[] getBBUpper()
getBBUpper in interface SimpleGeometrypublic double[] getBBLower()
getBBLower in interface SimpleGeometry