|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.TwentyCodes.android.SkyHook.GeoUtils
public class GeoUtils
This class contains common tools for computing common geological problems
| Field Summary | |
|---|---|
private static int |
EARTH_RADIUS_KM
|
static int |
maxLatitude
|
static int |
maxLongitude
|
static double |
MILLION
|
static int |
minLatitude
|
static int |
minLongitude
|
| Constructor Summary | |
|---|---|
GeoUtils()
|
|
| Method Summary | |
|---|---|
static double |
bearing(double lat1,
double lon1,
double lat2,
double lon2)
computes the bearing of lat2/lon2 in relationship from lat1/lon1 in degrees East |
static double |
bearing(GeoPoint p1,
GeoPoint p2)
computes the bearing of lat2/lon2 in relationship from lat1/lon1 in degrees East |
static GeoPoint |
distanceFrom(GeoPoint point,
double distance)
Calculates a geopoint x meters away of the geopoint supplied. |
static double |
distanceKm(double lat1,
double lon1,
double lat2,
double lon2)
computes the distance between to lat1/lon1 and lat2/lon2 based on the curve of the earth |
static double |
distanceKm(GeoPoint p1,
GeoPoint p2)
computes the distance between to p1 and p2 based on the curve of the earth |
static GeoPoint |
midPoint(GeoPoint p1,
GeoPoint p2)
computes a geopoint the is the central geopoint between p1 and p1 |
static double |
radToBearing(double rad)
converts radians to bearing |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static int EARTH_RADIUS_KM
public static double MILLION
public static int minLatitude
public static int maxLatitude
public static int minLongitude
public static int maxLongitude
| Constructor Detail |
|---|
public GeoUtils()
| Method Detail |
|---|
public static double bearing(double lat1,
double lon1,
double lat2,
double lon2)
lat1 - source latlon1 - source lonlat2 - destination latlon2 - destination lon
public static double bearing(GeoPoint p1,
GeoPoint p2)
p1 - source geopointp2 - destination geopoint
public static GeoPoint distanceFrom(GeoPoint point,
double distance)
point - central geopointdistance - in meters from the geopoint
public static double distanceKm(double lat1,
double lon1,
double lat2,
double lon2)
lat1 - source latlon1 - source lonlat2 - destination latlon2 - destination lon
public static double distanceKm(GeoPoint p1,
GeoPoint p2)
p1 - p2 -
public static GeoPoint midPoint(GeoPoint p1,
GeoPoint p2)
p1 - first geopointp2 - second geopoint
public static double radToBearing(double rad)
rad -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||