|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectau.cartersoft.GeoClasses.DistanceCalculator
public class DistanceCalculator
A class containing methods for performing calculations on geospatial information
Constructor Summary | |
---|---|
DistanceCalculator()
|
Method Summary | |
---|---|
static double |
calculateDistance(GeoPoint startpt,
GeoPoint endpt)
Finds the distance between two points |
static double |
convertLatToDistance(int lat)
Converts the difference between two latitudes as a distance in kilometres Android provides a method to get the latitude span of a map presently displayed on screen, this method converts that span to kilometres |
static double |
convertLngToDistance(double lat,
int lngDist)
Converts the difference between two longitudes as a distance in kilometres Android provides a method to get the longitude span of a map presently displayed on screen, this method converts that span to kilometres |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DistanceCalculator()
Method Detail |
---|
public static double calculateDistance(GeoPoint startpt, GeoPoint endpt)
startpt
- A GeoPoint containing the point to measure fromendpt
- A Geopoint containing the point to measure to
public static double convertLatToDistance(int lat)
lat
- The difference between two latitudes multiplied by 1,000,000 (the exact output of MapView.getLatitudeSpan())
public static double convertLngToDistance(double lat, int lngDist)
lat
- The latitude at which the longitude range is calculatedlngDist
- The difference between two longitudes multiplied by 1,000,000 (the exact output of MapView.getLatitudeSpan())
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |