Vertex
class Vertex implements VertexInterface
Properties
protected CoordinatesInterface | $from | The origin coordinate. |
|
protected CoordinatesInterface | $to | The destination coordinate. |
|
protected float | $gradient | ||
protected float | $ordinateIntercept | ||
protected int | $precision | ||
static array | $cardinalPoints | The cardinal points / directions (the four cardinal directions, the four ordinal directions, plus eight further divisions). |
Methods
Get the origin coordinate.
Get the destination coordinate.
Get the gradient (slope) of the vertex.
Get the ordinate (longitude) of the point where vertex intersects with the ordinate-axis (Prime-Meridian) of the coordinate system.
No description
No description
Returns the initial bearing from the origin coordinate to the destination coordinate in degrees.
Returns the final bearing from the origin coordinate to the destination coordinate in degrees.
Returns the initial cardinal point / direction from the origin coordinate to the destination coordinate.
Returns the final cardinal point / direction from the origin coordinate to the destination coordinate.
Returns the half-way point / coordinate along a great circle path between the origin and the destination coordinates.
Returns the destination point with a given bearing in degrees travelling along a (shortest distance) great circle arc and a distance in meters.
Returns true if the vertex passed on argument is on the same line as this object
Returns the other coordinate who is not the coordinate passed on argument
Returns the determinant value between $this (vertex) and another vertex.
Details
at line 53
VertexInterface
setFrom(CoordinatesInterface $from)
Set the origin coordinate.
at line 76
CoordinatesInterface
getFrom()
Get the origin coordinate.
at line 84
VertexInterface
setTo(CoordinatesInterface $to)
Set the destination coordinate.
at line 107
CoordinatesInterface
getTo()
Get the destination coordinate.
at line 115
int
getGradient()
Get the gradient (slope) of the vertex.
at line 123
int
getOrdinateIntercept()
Get the ordinate (longitude) of the point where vertex intersects with the ordinate-axis (Prime-Meridian) of the coordinate system.
at line 131
int
getPrecision()
No description
at line 140
$this
setPrecision(int $precision)
No description
at line 153
float
initialBearing()
Returns the initial bearing from the origin coordinate to the destination coordinate in degrees.
at line 171
float
finalBearing()
Returns the final bearing from the origin coordinate to the destination coordinate in degrees.
at line 190
string
initialCardinal()
Returns the initial cardinal point / direction from the origin coordinate to the destination coordinate.
at line 202
string
finalCardinal()
Returns the final cardinal point / direction from the origin coordinate to the destination coordinate.
at line 213
Coordinates
middle()
Returns the half-way point / coordinate along a great circle path between the origin and the destination coordinates.
at line 238
Coordinates
destination(int $bearing, int $distance)
Returns the destination point with a given bearing in degrees travelling along a (shortest distance) great circle arc and a distance in meters.
at line 259
bool
isOnSameLine(Vertex $vertex)
Returns true if the vertex passed on argument is on the same line as this object
at line 280
null|CoordinatesInterface
getOtherCoordinate(CoordinatesInterface $coordinate)
Returns the other coordinate who is not the coordinate passed on argument
at line 297
string
getDeterminant(Vertex $vertex)
Returns the determinant value between $this (vertex) and another vertex.