|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.TwentyCodes.android.location.GeoUtils
public class GeoUtils
This class contains common tools for computing common geological problems
| Field Summary | |
|---|---|
static int |
EARTH_RADIUS_KM
|
static double |
MILLION
|
| 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 boolean |
isIntersecting(GeoPoint userPoint,
float accuracyRadius,
GeoPoint locationPoint,
float locationRadius,
float fudgeFactor)
a convince method for testing if 2 circles on the the surface of the earth intersect. |
static MidPoint |
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 |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int EARTH_RADIUS_KM
public static final double MILLION
| 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 boolean isIntersecting(GeoPoint userPoint,
float accuracyRadius,
GeoPoint locationPoint,
float locationRadius,
float fudgeFactor)
userPoint - accuracyRadius - in KMlocationPoint - locationRadius - in KMfudgeFactor - how many KM the circles have to intersect
public static double distanceKm(GeoPoint p1,
GeoPoint p2)
p1 - p2 -
public static MidPoint 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 | |||||||||