PHP 클래스 League\Geotools\Distance\Distance

저자: Antoine Corcy ([email protected])
상속: extends League\Geotools\AbstractGeotools, implements League\Geotools\Distance\DistanceInterface
파일 보기 프로젝트 열기: toin0u/geotools 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$unit string The user unit.

공개 메소드들

메소드 설명
flat ( ) : double Returns the approximate flat distance between two coordinates using Pythagoras’ theorem which is not very accurate.
getFrom ( ) {@inheritDoc}
getTo ( ) {@inheritDoc}
greatCircle ( ) : double Returns the approximate distance between two coordinates using the spherical trigonometry called Great Circle Distance.
haversine ( ) : double Returns the approximate sea level great circle (Earth) distance between two coordinates using the Haversine formula which is accurate to around 0.3%.
in ( $unit ) {@inheritDoc}
setFrom ( League\Geotools\Coordinate\CoordinateInterface $from ) {@inheritDoc}
setTo ( League\Geotools\Coordinate\CoordinateInterface $to ) {@inheritDoc}
vincenty ( ) : double Returns geodetic distance between between two coordinates using Vincenty inverse formula for ellipsoids which is accurate to within 0.5mm.

보호된 메소드들

메소드 설명
convertToUserUnit ( double $meters ) : double Converts results in meters to user's unit (if any).

메소드 상세

convertToUserUnit() 보호된 메소드

The default returned value is in meters.
protected convertToUserUnit ( double $meters ) : double
$meters double
리턴 double

flat() 공개 메소드

Returns the approximate flat distance between two coordinates using Pythagoras’ theorem which is not very accurate.
또한 보기: http://en.wikipedia.org/wiki/Pythagorean_theorem
또한 보기: http://en.wikipedia.org/wiki/Equirectangular_projection
public flat ( ) : double
리턴 double The distance in meters

getFrom() 공개 메소드

{@inheritDoc}
public getFrom ( )

getTo() 공개 메소드

{@inheritDoc}
public getTo ( )

greatCircle() 공개 메소드

Returns the approximate distance between two coordinates using the spherical trigonometry called Great Circle Distance.
또한 보기: http://www.ga.gov.au/earth-monitoring/geodesy/geodetic-techniques/distance-calculation-algorithms.html#circle
또한 보기: http://en.wikipedia.org/wiki/Cosine_law
public greatCircle ( ) : double
리턴 double The distance in meters

haversine() 공개 메소드

Returns the approximate sea level great circle (Earth) distance between two coordinates using the Haversine formula which is accurate to around 0.3%.
또한 보기: http://www.movable-type.co.uk/scripts/latlong.html
public haversine ( ) : double
리턴 double The distance in meters

in() 공개 메소드

{@inheritDoc}
public in ( $unit )

setFrom() 공개 메소드

{@inheritDoc}
public setFrom ( League\Geotools\Coordinate\CoordinateInterface $from )
$from League\Geotools\Coordinate\CoordinateInterface

setTo() 공개 메소드

{@inheritDoc}
public setTo ( League\Geotools\Coordinate\CoordinateInterface $to )
$to League\Geotools\Coordinate\CoordinateInterface

vincenty() 공개 메소드

Returns geodetic distance between between two coordinates using Vincenty inverse formula for ellipsoids which is accurate to within 0.5mm.
또한 보기: http://www.movable-type.co.uk/scripts/latlong-vincenty.html
public vincenty ( ) : double
리턴 double The distance in meters

프로퍼티 상세

$unit 보호되어 있는 프로퍼티

The user unit.
protected string $unit
리턴 string