C# Class BikeInCity.Utils.GeoMath

显示文件 Open project: hoonzis/bikeincity Class Usage Examples

Public Methods

Method Description
ComputeDistance ( double startLat, double startLng, double endLat, double endLng ) : int

Returns distsance in meters between two points of earth using the Spherical Law of Cosines

Harvesine ( double lat1, double lng1, double lat2, double lng2 ) : int
Pythagoras ( double lat1, double lng1, double lat2, double lng2 ) : int
SphericalEarthProjectedToAPlane ( double lat1, double lng1, double lat2, double lng2 ) : int
ToRad ( double angle ) : double

Converts degrees to radians. Used to convert the latitude and longitude coordinates.

Method Details

ComputeDistance() public static method

Returns distsance in meters between two points of earth using the Spherical Law of Cosines
public static ComputeDistance ( double startLat, double startLng, double endLat, double endLng ) : int
startLat double
startLng double
endLat double
endLng double
return int

Harvesine() public static method

public static Harvesine ( double lat1, double lng1, double lat2, double lng2 ) : int
lat1 double
lng1 double
lat2 double
lng2 double
return int

Pythagoras() public static method

public static Pythagoras ( double lat1, double lng1, double lat2, double lng2 ) : int
lat1 double
lng1 double
lat2 double
lng2 double
return int

SphericalEarthProjectedToAPlane() public static method

public static SphericalEarthProjectedToAPlane ( double lat1, double lng1, double lat2, double lng2 ) : int
lat1 double
lng1 double
lat2 double
lng2 double
return int

ToRad() public static method

Converts degrees to radians. Used to convert the latitude and longitude coordinates.
public static ToRad ( double angle ) : double
angle double
return double