C# 클래스 Geolocation.GeoCalculator

Various utility methods for calculating geographically-based values
파일 보기 프로젝트 열기: scottschluer/geolocation

공개 프로퍼티들

프로퍼티 타입 설명
EarthRadiusInMiles double

공개 메소드들

메소드 설명
GetBearing ( Coordinate originCoordinate, Coordinate destinationCoordinate ) : double

Calculates the bearing, in degrees between two Coordinate objects

GetBearing ( double originLatitude, double originLongitude, double destinationLatitude, double destinationLongitude ) : double

Calculates the bearing, in degrees between two geographic points

GetDirection ( Coordinate originCoordinate, Coordinate destinationCoordinate ) : string

Gets the cardinal or ordinal direction from the origin point to the destination point

GetDirection ( double originLatitude, double originLongitude, double destinationLatitude, double destinationLongitude ) : string

Gets the cardinal or ordinal direction from the origin point to the destination point

GetDistance ( Coordinate originCoordinate, Coordinate destinationCoordinate, int decimalPlaces ) : Double

Calculate the distance between two sets of Coordinate objects

GetDistance ( double originLatitude, double originLongitude, double destinationLatitude, double destinationLongitude, int decimalPlaces ) : double

Calculate the distance between two sets of coordinates. The latitude of the origin location in decimal notation The longitude of the origin location in decimal notation The latitude of the destination location in decimal notation The longitude of the destination location in decimal notation The number of decimal places to round the return value to A Double value representing the distance in miles from the origin to the destination coordinate

메소드 상세

GetBearing() 공개 정적인 메소드

Calculates the bearing, in degrees between two Coordinate objects
public static GetBearing ( Coordinate originCoordinate, Coordinate destinationCoordinate ) : double
originCoordinate Coordinate A object representing the origin location
destinationCoordinate Coordinate A object representing the destination location
리턴 double

GetBearing() 공개 정적인 메소드

Calculates the bearing, in degrees between two geographic points
public static GetBearing ( double originLatitude, double originLongitude, double destinationLatitude, double destinationLongitude ) : double
originLatitude double The latitude of the origin location in decimal notation
originLongitude double The longitude of the origin location in decimal notation
destinationLatitude double The latitude of the destination location in decimal notation
destinationLongitude double The longitude of the destination location in decimal notation
리턴 double

GetDirection() 공개 정적인 메소드

Gets the cardinal or ordinal direction from the origin point to the destination point
public static GetDirection ( Coordinate originCoordinate, Coordinate destinationCoordinate ) : string
originCoordinate Coordinate A object representing the origin location
destinationCoordinate Coordinate A object representing the destination location
리턴 string

GetDirection() 공개 정적인 메소드

Gets the cardinal or ordinal direction from the origin point to the destination point
public static GetDirection ( double originLatitude, double originLongitude, double destinationLatitude, double destinationLongitude ) : string
originLatitude double The latitude of the origin location in decimal notation
originLongitude double The longitude of the origin location in decimal notation
destinationLatitude double The latitude of the destination location in decimal notation
destinationLongitude double The longitude of the destination location in decimal notation
리턴 string

GetDistance() 공개 정적인 메소드

Calculate the distance between two sets of Coordinate objects
public static GetDistance ( Coordinate originCoordinate, Coordinate destinationCoordinate, int decimalPlaces ) : Double
originCoordinate Coordinate A object representing the origin location
destinationCoordinate Coordinate A object representing the destination location
decimalPlaces int The number of decimal places to round the return value to
리턴 Double

GetDistance() 공개 정적인 메소드

Calculate the distance between two sets of coordinates. The latitude of the origin location in decimal notation The longitude of the origin location in decimal notation The latitude of the destination location in decimal notation The longitude of the destination location in decimal notation The number of decimal places to round the return value to A Double value representing the distance in miles from the origin to the destination coordinate
public static GetDistance ( double originLatitude, double originLongitude, double destinationLatitude, double destinationLongitude, int decimalPlaces ) : double
originLatitude double
originLongitude double
destinationLatitude double
destinationLongitude double
decimalPlaces int
리턴 double

프로퍼티 상세

EarthRadiusInMiles 공개적으로 정적으로 프로퍼티

Radius of the earth in miles
public static double EarthRadiusInMiles
리턴 double