Semantic MediaWiki and related extensions
Static Public Member Functions | List of all members
Maps\GeoFunctions Class Reference

Static Public Member Functions

static calculateDistance (LatLongValue $start, LatLongValue $end)
 
static findDestination (LatLongValue $startingCoordinates, $bearing, $distance)
 

Detailed Description

Static class containing geographical functions.

GNU GPL v2+

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
Pnelnik
Matěj Grabovský

Member Function Documentation

◆ calculateDistance()

static Maps\GeoFunctions::calculateDistance ( LatLongValue  $start,
LatLongValue  $end 
)
static

Returns the geographical distance between two coordinates. See http://en.wikipedia.org/wiki/Geographical_distance

Since
2.0
Parameters
LatLongValue$start
LatLongValue$end
Returns
float Distance in m.

◆ findDestination()

static Maps\GeoFunctions::findDestination ( LatLongValue  $startingCoordinates,
  $bearing,
  $distance 
)
static

Finds a destination given a starting location, bearing and distance.

Since
2.0
Parameters
LatLongValue$startingCoordinates
float$bearingThe initial bearing in degrees.
float$distanceThe distance to travel in km.
Returns
array The destination coordinates, as non-directional floats in an array with lat and lon keys.

The documentation for this class was generated from the following file:

About | General disclaimer | Privacy policy