Property | Type | Description | |
---|---|---|---|
$ellipsoid | ValueObjects\Geography\Ellipsoid | ||
$latitude | ValueObjects\Geography\Latitude | ||
$longitude | ValueObjects\Geography\Longitude |
Method | Description | |
---|---|---|
__construct ( ValueObjects\Geography\Latitude $latitude, ValueObjects\Geography\Longitude $longitude, ValueObjects\Geography\Ellipsoid $ellipsoid = null ) | Returns a new Coordinate object | |
__toString ( ) : string | Returns a native string version of the Coordiantes object in format "$latitude,$longitude" | |
distanceFrom ( |
Calculates the distance between two Coordinate objects | |
fromNative ( ) : self | Returns a new Coordinate object from native PHP arguments | |
getEllipsoid ( ) : ValueObjects\Geography\Ellipsoid | Returns ellipsoid | |
getLatitude ( ) : ValueObjects\Geography\Latitude | Returns latitude | |
getLongitude ( ) : ValueObjects\Geography\Longitude | Returns longitude | |
sameValueAs ( ValueObjects\ValueObjectInterface $coordinate ) : boolean | Tells whether tow Coordinate objects are equal | |
toDecimalMinutes ( ) : ValueObjects\StringLiteral\StringLiteral | Returns a decimal minutes representation of the coordinate | |
toDegreesMinutesSeconds ( ) : ValueObjects\StringLiteral\StringLiteral | Returns a degrees/minutes/seconds representation of the coordinate | |
toUniversalTransverseMercator ( ) : ValueObjects\StringLiteral\StringLiteral | Returns a Universal Transverse Mercator projection representation of the coordinate in meters |
Method | Description | |
---|---|---|
getBaseCoordinate ( self $coordinate ) : |
Returns the underlying Coordinate object |
public __construct ( ValueObjects\Geography\Latitude $latitude, ValueObjects\Geography\Longitude $longitude, ValueObjects\Geography\Ellipsoid $ellipsoid = null ) | ||
$latitude | ValueObjects\Geography\Latitude | |
$longitude | ValueObjects\Geography\Longitude | |
$ellipsoid | ValueObjects\Geography\Ellipsoid |
public __toString ( ) : string | ||
return | string |
public distanceFrom ( |
||
$coordinate | ||
$unit | ValueObjects\Geography\DistanceUnit | |
$formula | ValueObjects\Geography\DistanceFormula | |
return | ValueObjects\Number\Real |
public static fromNative ( ) : self | ||
return | self |
protected static getBaseCoordinate ( self $coordinate ) : |
||
$coordinate | self | |
return |
public getEllipsoid ( ) : ValueObjects\Geography\Ellipsoid | ||
return | ValueObjects\Geography\Ellipsoid |
public getLatitude ( ) : ValueObjects\Geography\Latitude | ||
return | ValueObjects\Geography\Latitude |
public getLongitude ( ) : ValueObjects\Geography\Longitude | ||
return | ValueObjects\Geography\Longitude |
public sameValueAs ( ValueObjects\ValueObjectInterface $coordinate ) : boolean | ||
$coordinate | ValueObjects\ValueObjectInterface | |
return | boolean |
public toDecimalMinutes ( ) : ValueObjects\StringLiteral\StringLiteral | ||
return | ValueObjects\StringLiteral\StringLiteral |
public toDegreesMinutesSeconds ( ) : ValueObjects\StringLiteral\StringLiteral | ||
return | ValueObjects\StringLiteral\StringLiteral |
public toUniversalTransverseMercator ( ) : ValueObjects\StringLiteral\StringLiteral | ||
return | ValueObjects\StringLiteral\StringLiteral |
protected Ellipsoid,ValueObjects\Geography $ellipsoid | ||
return | ValueObjects\Geography\Ellipsoid |
protected Latitude,ValueObjects\Geography $latitude | ||
return | ValueObjects\Geography\Latitude |