C# 클래스 Spatial4n.Core.Distance.DistanceUtils

파일 보기 프로젝트 열기: synhershko/Spatial4n 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DEGREES_TO_RADIANS double
DEG_180_AS_RADS double
DEG_225_AS_RADS double
DEG_270_AS_RADS double
DEG_45_AS_RADS double
DEG_90_AS_RADS double
DEG_TO_KM double
EARTH_EQUATORIAL_RADIUS_KM double
EARTH_EQUATORIAL_RADIUS_MI double
EARTH_MEAN_RADIUS_KM double
EARTH_MEAN_RADIUS_MI double
KM_TO_DEG double
KM_TO_MILES double
MILES_TO_KM double
RADIANS_TO_DEGREES double
SIN_45_AS_RADS double

공개 메소드들

메소드 설명
CalcBoxByDistFromPtDEG ( double lat, double lon, double distDEG, SpatialContext ctx, Rectangle reuse ) : Rectangle
CalcBoxByDistFromPt_deltaLonDEG ( double lat, double lon, double distDEG ) : double

The delta longitude of a point-distance. In other words, half the width of the bounding box of a circle.

CalcBoxByDistFromPt_latHorizAxisDEG ( double lat, double lon, double distDEG ) : double

The latitude of the horizontal axis (e.g. left-right line) of a circle. The horizontal axis of a circle passes through its furthest left-most and right-most edges. On a 2D plane, this result is always from.getY() but, perhaps surprisingly, on a sphere it is going to be slightly different.

Degrees2Dist ( double degrees, double radius ) : double
Dist2Degrees ( double dist, double radius ) : double

Converts a distance in the units of the radius to degrees (360 degrees are in a circle). A spherical earth model is assumed.

Dist2Radians ( double dist, double radius ) : double

Converts a distance in the units of radius (e.g. kilometers) to radians (multiples of the radius). A spherical earth model is assumed.

DistHaversineRAD ( double lat1, double lon1, double lat2, double lon2 ) : double
DistLawOfCosinesRAD ( double lat1, double lon1, double lat2, double lon2 ) : double
DistSquaredCartesian ( double vec1, double vec2 ) : double
DistVincentyRAD ( double lat1, double lon1, double lat2, double lon2 ) : double
NormLatDEG ( double lat_deg ) : double

Puts in range -90 <= lat_deg <= 90.

NormLonDEG ( double lon_deg ) : double

Puts in range -180 <= lon_deg <= +180.

PointOnBearingRAD ( double startLat, double startLon, double distanceRAD, double bearingRAD, SpatialContext ctx, System.Point reuse ) : System.Point
Radians2Dist ( double radians, double radius ) : double
ToDegrees ( double radians ) : double

Same as {@link Math#toDegrees(double)} but 3x faster (multiply vs. divide). See CompareRadiansSnippet.java in tests.

ToRadians ( double degrees ) : double

Same as {@link Math#toRadians(double)} but 3x faster (multiply vs. divide). See CompareRadiansSnippet.java in tests.

VectorBoxCorner ( double center, double result, double distance, bool upperRight ) : double[]
VectorDistance ( double vec1, double vec2, double power ) : double

Calculate the p-norm (i.e. length) between two vectors

VectorDistance ( double vec1, double vec2, double power, double oneOverPower ) : double

Calculate the p-norm (i.e. length) between two vectors

메소드 상세

CalcBoxByDistFromPtDEG() 공개 정적인 메소드

public static CalcBoxByDistFromPtDEG ( double lat, double lon, double distDEG, SpatialContext ctx, Rectangle reuse ) : Rectangle
lat double
lon double
distDEG double
ctx Spatial4n.Core.Context.SpatialContext
reuse Rectangle
리턴 Rectangle

CalcBoxByDistFromPt_deltaLonDEG() 공개 정적인 메소드

The delta longitude of a point-distance. In other words, half the width of the bounding box of a circle.
public static CalcBoxByDistFromPt_deltaLonDEG ( double lat, double lon, double distDEG ) : double
lat double
lon double
distDEG double
리턴 double

CalcBoxByDistFromPt_latHorizAxisDEG() 공개 정적인 메소드

The latitude of the horizontal axis (e.g. left-right line) of a circle. The horizontal axis of a circle passes through its furthest left-most and right-most edges. On a 2D plane, this result is always from.getY() but, perhaps surprisingly, on a sphere it is going to be slightly different.
public static CalcBoxByDistFromPt_latHorizAxisDEG ( double lat, double lon, double distDEG ) : double
lat double
lon double
distDEG double
리턴 double

Degrees2Dist() 공개 정적인 메소드

public static Degrees2Dist ( double degrees, double radius ) : double
degrees double
radius double
리턴 double

Dist2Degrees() 공개 정적인 메소드

Converts a distance in the units of the radius to degrees (360 degrees are in a circle). A spherical earth model is assumed.
public static Dist2Degrees ( double dist, double radius ) : double
dist double
radius double
리턴 double

Dist2Radians() 공개 정적인 메소드

Converts a distance in the units of radius (e.g. kilometers) to radians (multiples of the radius). A spherical earth model is assumed.
public static Dist2Radians ( double dist, double radius ) : double
dist double
radius double
리턴 double

DistHaversineRAD() 공개 정적인 메소드

public static DistHaversineRAD ( double lat1, double lon1, double lat2, double lon2 ) : double
lat1 double
lon1 double
lat2 double
lon2 double
리턴 double

DistLawOfCosinesRAD() 공개 정적인 메소드

public static DistLawOfCosinesRAD ( double lat1, double lon1, double lat2, double lon2 ) : double
lat1 double
lon1 double
lat2 double
lon2 double
리턴 double

DistSquaredCartesian() 공개 정적인 메소드

public static DistSquaredCartesian ( double vec1, double vec2 ) : double
vec1 double
vec2 double
리턴 double

DistVincentyRAD() 공개 정적인 메소드

public static DistVincentyRAD ( double lat1, double lon1, double lat2, double lon2 ) : double
lat1 double
lon1 double
lat2 double
lon2 double
리턴 double

NormLatDEG() 공개 정적인 메소드

Puts in range -90 <= lat_deg <= 90.
public static NormLatDEG ( double lat_deg ) : double
lat_deg double
리턴 double

NormLonDEG() 공개 정적인 메소드

Puts in range -180 <= lon_deg <= +180.
public static NormLonDEG ( double lon_deg ) : double
lon_deg double
리턴 double

PointOnBearingRAD() 공개 정적인 메소드

public static PointOnBearingRAD ( double startLat, double startLon, double distanceRAD, double bearingRAD, SpatialContext ctx, System.Point reuse ) : System.Point
startLat double
startLon double
distanceRAD double
bearingRAD double
ctx Spatial4n.Core.Context.SpatialContext
reuse System.Point
리턴 System.Point

Radians2Dist() 공개 정적인 메소드

public static Radians2Dist ( double radians, double radius ) : double
radians double
radius double
리턴 double

ToDegrees() 공개 정적인 메소드

Same as {@link Math#toDegrees(double)} but 3x faster (multiply vs. divide). See CompareRadiansSnippet.java in tests.
public static ToDegrees ( double radians ) : double
radians double
리턴 double

ToRadians() 공개 정적인 메소드

Same as {@link Math#toRadians(double)} but 3x faster (multiply vs. divide). See CompareRadiansSnippet.java in tests.
public static ToRadians ( double degrees ) : double
degrees double
리턴 double

VectorBoxCorner() 공개 정적인 메소드

public static VectorBoxCorner ( double center, double result, double distance, bool upperRight ) : double[]
center double
result double
distance double
upperRight bool
리턴 double[]

VectorDistance() 공개 정적인 메소드

Calculate the p-norm (i.e. length) between two vectors
public static VectorDistance ( double vec1, double vec2, double power ) : double
vec1 double The first vector
vec2 double The second vector
power double The power (2 for cartesian distance, 1 for manhattan, etc.)
리턴 double

VectorDistance() 공개 정적인 메소드

Calculate the p-norm (i.e. length) between two vectors
public static VectorDistance ( double vec1, double vec2, double power, double oneOverPower ) : double
vec1 double The first vector
vec2 double The second vector
power double The power (2 for cartesian distance, 1 for manhattan, etc.)
oneOverPower double If you've precalculated oneOverPower and cached it, use this method to save one division operation over {@link #vectorDistance(double[], double[], double)}.
리턴 double

프로퍼티 상세

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

public static double DEGREES_TO_RADIANS
리턴 double

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

public static double DEG_180_AS_RADS
리턴 double

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

public static double DEG_225_AS_RADS
리턴 double

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

public static double DEG_270_AS_RADS
리턴 double

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

public static double DEG_45_AS_RADS
리턴 double

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

public static double DEG_90_AS_RADS
리턴 double

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

public static double DEG_TO_KM
리턴 double

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

public static double EARTH_EQUATORIAL_RADIUS_KM
리턴 double

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

public static double EARTH_EQUATORIAL_RADIUS_MI
리턴 double

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

The International Union of Geodesy and Geophysics says the Earth's mean radius in KM is: [1] http://en.wikipedia.org/wiki/Earth_radius
public static double EARTH_MEAN_RADIUS_KM
리턴 double

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

public static double EARTH_MEAN_RADIUS_MI
리턴 double

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

public static double KM_TO_DEG
리턴 double

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

public static double KM_TO_MILES
리턴 double

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

public static double MILES_TO_KM
리턴 double

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

public static double RADIANS_TO_DEGREES
리턴 double

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

public static double SIN_45_AS_RADS
리턴 double