Distance class
- author Antoine Corcy
CloneableInstantiable
| Methods |
| public flat() Returns the approximate flat distance between two coordinates using Pythagoras’ theorem which is not very accurate.
|
| public getFrom() |
| public getTo() |
| public greatCircle() Returns the approximate distance between two coordinates using the spherical trigonometry called Great Circle Distance.
|
| public haversine() Returns the approximate sea level great circle (Earth) distance between two coordinates using the Haversine formula which is accurate to around 0.3%.
|
| public in( $unit) |
| public setFrom(League |
| public setTo(League |
| public vincenty() Returns geodetic distance between between two coordinates using Vincenty inverse formula for ellipsoids which is accurate to within 0.5mm.
|
| Properties |
| protected $from = NULL The origin coordinate.
|
| protected $to = NULL The destination coordinate.
|
| protected $unit = NULL The user unit.
|
| Methods |
| protected convertToUserUnit( $meters) Converts results in meters to user's unit (if any). The default returned value is in meters.
|