Coordinates
class Coordinates implements CoordinatesInterface
Properties
private float | $latitude | ||
private float | $longitude | ||
protected Ellipsoid | $ellipsoid | The selected ellipsoid. |
|
protected | $precision |
Methods
Set the latitude.
Set the longitude.
No description
Returns the latitude.
Returns the longitude.
Returns the latitude.
Returns the longitude.
Get the Ellipsoid.
No description
Normalizes a latitude to the (-90, 90) range.
Normalizes a longitude to the (-180, 180) range.
Returns the coordinates as a tuple
No description
Details
at line 33
__construct(float $latitude, float $longitude, Ellipsoid $ellipsoid = null)
No description
at line 46
setLatitude(float $latitude)
Set the latitude.
at line 56
setLongitude(float $longitude)
Set the longitude.
at line 65
$this
setPrecision(int $precision)
No description
at line 77
float
getLatitude()
Returns the latitude.
at line 87
float
getLongitude()
Returns the longitude.
at line 97
float
formatLatitude()
Returns the latitude.
at line 107
float
formatLongitude()
Returns the longitude.
at line 115
Ellipsoid
getEllipsoid()
Get the Ellipsoid.
at line 123
int
getPrecision()
No description
at line 133
bool
isEqual(CoordinatesInterface $coordinate)
Returns a boolean determining coordinates equality
at line 147
float
normalizeLatitude(float $latitude)
Normalizes a latitude to the (-90, 90) range.
Latitudes below -90.0 or above 90.0 degrees are capped, not wrapped.
at line 160
float
normalizeLongitude(float $longitude)
Normalizes a longitude to the (-180, 180) range.
Longitudes below -180.0 or abode 180.0 degrees are wrapped.
at line 177
array
toArray()
Returns the coordinates as a tuple
at line 182
protected string
typeToString($value)
No description