public class EarthArea
extends javafx.geometry.Rectangle2D
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 |
EarthArea(int areaNumber,
double lonMin,
double latMin,
double width,
double height)
EarthArea constructor, see IseaSplitter project to divide Earth in areas.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double longitude,
double latitude)
Override Rectangle2D.contains to manage 180 meridian,
checks if a point is inside the area.
|
boolean |
contains(javafx.geometry.Point2D coordinate)
Override Rectangle2D.contains to manage 180 meridian,
checks if a point is inside the area.
|
java.lang.String |
filename()
Getter for the fileName of the area.
|
int |
getAreaNumber()
Getter for the area number (identifier)
|
javafx.geometry.Point2D |
getCenter()
Getter for area center, x is real longitude, y is real latitude
|
boolean |
intersects(double longitude,
double latitude,
double width,
double height)
Override Rectangle2D.intersects to manage 180 meridian,
check intersection between areas.
|
boolean |
intersects(javafx.geometry.Rectangle2D area)
Override Rectangle2D.intersects to manage 180 meridian.
|
boolean |
over180()
Checks if area is over 180 meridian
|
java.lang.String |
toString()
Getter for description of area.
|
protected EarthArea(int areaNumber, double lonMin, double latMin, double width, double height)
areaNumber
- the area number (identifier)lonMin
- minimum longitude for bottom left corner of area (south)latMin
- minimum latitude for bottom left corner of area (east)width
- length of area in longitude degreeheight
- height of area in latitude degreepublic int getAreaNumber()
public javafx.geometry.Point2D getCenter()
public boolean over180()
public boolean intersects(javafx.geometry.Rectangle2D area)
intersects
in class javafx.geometry.Rectangle2D
area
- the area who intersect this (or not)public boolean intersects(double longitude, double latitude, double width, double height)
intersects
in class javafx.geometry.Rectangle2D
longitude
- of the area who intersect this (or not)latitude
- of the area who intersect this (or not)width
- of the area who intersect this (or not)height
- of the area who intersect this (or not)public boolean contains(javafx.geometry.Point2D coordinate)
contains
in class javafx.geometry.Rectangle2D
coordinate
- longitude (x) and latitude (y) of pointpublic boolean contains(double longitude, double latitude)
contains
in class javafx.geometry.Rectangle2D
longitude
- longitude of pointlatitude
- latitude of pointpublic java.lang.String filename()
public java.lang.String toString()
toString
in class javafx.geometry.Rectangle2D