|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cts.cs.GeographicExtent
public class GeographicExtent
A geographic extent is an area of the Earth surface delimited by a southern latitude, a northern latitude, a western longitude and an eastern longitude.
The main difference between planimetric extent and geographic extent is that geographic extent handles the case where the extent includes the 180 meridian. In that case, a point included in the extent may have a longitude (ex. -179) which is lesser than western meridian (ex. 170) and lesser than eastern meridian ex. -170).
| Field Summary | |
|---|---|
static GeographicExtent |
WORLD
The World Extent that contains all the planet surface. |
| Constructor Summary | |
|---|---|
GeographicExtent(String name,
double southernBound,
double northernBound,
double westernBound,
double easternBound)
Creates a new GeographicExtent. |
|
GeographicExtent(String name,
double southernBound,
double northernBound,
double westernBound,
double easternBound,
double modulo)
Creates a new GeographicExtent. |
|
| Method Summary | |
|---|---|
double |
getEasternBound()
Return the eastern bound of this geographic area. |
double |
getModulo()
Return the modulo value (360 for an extent in degree). |
String |
getName()
Return the name of this geographic area. |
double |
getNorthernBound()
Return the northern bound of this geographic area. |
double |
getSouthernBound()
Return the southern bound of this geographic area. |
double |
getWesternBound()
Return the western bound of this geographic area. |
boolean |
isInside(double[] coord)
Return whether coord is inside this Extent or not. |
boolean |
isInside(double lat,
double lon)
Return whether the point formed by input latitude and longitude is inside this GeographicExtent or not. |
String |
toString()
Return a String representation of this GeographicExtent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final GeographicExtent WORLD
| Constructor Detail |
|---|
public GeographicExtent(String name,
double southernBound,
double northernBound,
double westernBound,
double easternBound)
name - the name of the GeographicExtentsouthernBound - the southern bound of the GeographicExtent, in
decimal degreenorthernBound - the northern bound of the GeographicExtent, in
decimal degreewesternBound - the western bound of the GeographicExtent, in decimal
degreeeasternBound - the eastern bound of the GeographicExtent, in decimal
degree
public GeographicExtent(String name,
double southernBound,
double northernBound,
double westernBound,
double easternBound,
double modulo)
name - the name of the GeographicExtentsouthernBound - the southern bound of the GeographicExtent, in
decimal degreenorthernBound - the northern bound of the GeographicExtent, in
decimal degreewesternBound - the western bound of the GeographicExtent, in decimal
degreeeasternBound - the eastern bound of the GeographicExtent, in decimal
degreemodulo - the modulo value for the GeographicExtent| Method Detail |
|---|
public String getName()
getName in interface Extentpublic double getWesternBound()
public double getEasternBound()
public double getSouthernBound()
public double getNorthernBound()
public double getModulo()
public boolean isInside(double lat,
double lon)
lat - the latitude of the point to test, expressed in decimal degreelon - the longitude of the point to test, expressed in decimal
degreepublic boolean isInside(double[] coord)
GeographicExtent, coord must be a latitude and a longitude
(in this order) and in decimal degrees.
isInside in interface Extentcoord - the coordinates to testpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||