public class CellArea extends EarthArea
w w w w +---------------+ +---------------+ +---------------+ +---------------+ | | | | | | | | | | | | | | | | | C | h | C | h | C | h | C | h | | | | | | | | | | | | | | | | | | | M-------+-------+ M-------+-------+ M---------------+ | M---------------+ 180 0 0 fig1 fig2 fig3 fig4 C : center M : (minX,minY) = (lonMin,latMin) w : width = width in degree h : height = heigth in degree fig1 : consider longitude after 180 as positive fig2 : longitude from negative to positive (no considerations) fig3 : longitude from negative to negative (no considerations) fig4 : longitude from positive to positive (no considerations)
Modifier | Constructor and Description |
---|---|
protected |
CellArea(EarthArea earthArea)
Constructs a CellArea from its equivalent EarthArea.
|
protected |
CellArea(int areaNumber,
double lonMin,
double latMin,
double width,
double height)
CellArea constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addCell(Cell cell)
Adds a cell to the cell area, the cell must have intersection (or is included in)
with the cell area.
|
Cell |
getCell(double longitude,
double latitude)
Getter for cell from geographic point,
CellArea (this) should contains the point (longitude,latitude)
|
java.util.ArrayList<Cell> |
getCells()
Getter for all cells having intersection or included in the cell area (this)
|
java.lang.String |
toString()
Getter for description of cell area.
|
contains, contains, filename, getAreaNumber, getCenter, intersects, intersects, over180
protected CellArea(int areaNumber, double lonMin, double latMin, double width, double height)
areaNumber
- the cell area idlonMin
- minimum longitude for bottom left corner of cell area (south)latMin
- minimum latitude for bottom left corner of cell area (east)width
- length of cell area in longitude degreeheight
- height of cell area in latitude degreeprotected CellArea(EarthArea earthArea)
earthArea
- the equivalent EarthAreapublic void addCell(Cell cell)
cell
- the cell to addpublic java.util.ArrayList<Cell> getCells()
public Cell getCell(double longitude, double latitude) throws DiscreteGlobalGridException
longitude
- longitude for pointlatitude
- latitude for pointDiscreteGlobalGridException
- if can't be found