Property | Type | Description | |
---|---|---|---|
$unit | string | The user unit. |
Method | Description | |
---|---|---|
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. |
Method | Description | |
---|---|---|
convertToUserUnit ( double $meters ) : double | Converts results in meters to user's unit (if any). |
protected convertToUserUnit ( double $meters ) : double | ||
$meters | double | |
return | double |
public flat ( ) : double | ||
return | double | The distance in meters |
public greatCircle ( ) : double | ||
return | double | The distance in meters |
public haversine ( ) : double | ||
return | double | The distance in meters |
public setFrom ( League\Geotools\Coordinate\CoordinateInterface $from ) | ||
$from | League\Geotools\Coordinate\CoordinateInterface |
public setTo ( League\Geotools\Coordinate\CoordinateInterface $to ) | ||
$to | League\Geotools\Coordinate\CoordinateInterface |
public vincenty ( ) : double | ||
return | double | The distance in meters |