PHP Class ValueObjects\Geography\Coordinate

Inheritance: implements ValueObjects\ValueObjectInterface
Afficher le fichier Open project: nicolopignatelli/valueobjects Class Usage Examples

Protected Properties

Свойство Type Description
$ellipsoid ValueObjects\Geography\Ellipsoid
$latitude ValueObjects\Geography\Latitude
$longitude ValueObjects\Geography\Longitude

Méthodes publiques

Méthode 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 ( Coordinate $coordinate, ValueObjects\Geography\DistanceUnit $unit = null, ValueObjects\Geography\DistanceFormula $formula = null ) : ValueObjects\Number\Real 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

Méthodes protégées

Méthode Description
getBaseCoordinate ( self $coordinate ) : Coordinate Returns the underlying Coordinate object

Method Details

__construct() public méthode

Returns a new 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

__toString() public méthode

Returns a native string version of the Coordiantes object in format "$latitude,$longitude"
public __toString ( ) : string
Résultat string

distanceFrom() public méthode

Calculates the distance between two Coordinate objects
public distanceFrom ( Coordinate $coordinate, ValueObjects\Geography\DistanceUnit $unit = null, ValueObjects\Geography\DistanceFormula $formula = null ) : ValueObjects\Number\Real
$coordinate Coordinate
$unit ValueObjects\Geography\DistanceUnit
$formula ValueObjects\Geography\DistanceFormula
Résultat ValueObjects\Number\Real

fromNative() public static méthode

Returns a new Coordinate object from native PHP arguments
public static fromNative ( ) : self
Résultat self

getBaseCoordinate() protected static méthode

Returns the underlying Coordinate object
protected static getBaseCoordinate ( self $coordinate ) : Coordinate
$coordinate self
Résultat League\Geotools\Coordinate\Coordinate

getEllipsoid() public méthode

Returns ellipsoid
public getEllipsoid ( ) : ValueObjects\Geography\Ellipsoid
Résultat ValueObjects\Geography\Ellipsoid

getLatitude() public méthode

Returns latitude
public getLatitude ( ) : ValueObjects\Geography\Latitude
Résultat ValueObjects\Geography\Latitude

getLongitude() public méthode

Returns longitude
public getLongitude ( ) : ValueObjects\Geography\Longitude
Résultat ValueObjects\Geography\Longitude

sameValueAs() public méthode

Tells whether tow Coordinate objects are equal
public sameValueAs ( ValueObjects\ValueObjectInterface $coordinate ) : boolean
$coordinate ValueObjects\ValueObjectInterface
Résultat boolean

toDecimalMinutes() public méthode

Returns a decimal minutes representation of the coordinate
public toDecimalMinutes ( ) : ValueObjects\StringLiteral\StringLiteral
Résultat ValueObjects\StringLiteral\StringLiteral

toDegreesMinutesSeconds() public méthode

Returns a degrees/minutes/seconds representation of the coordinate
public toDegreesMinutesSeconds ( ) : ValueObjects\StringLiteral\StringLiteral
Résultat ValueObjects\StringLiteral\StringLiteral

toUniversalTransverseMercator() public méthode

Returns a Universal Transverse Mercator projection representation of the coordinate in meters
public toUniversalTransverseMercator ( ) : ValueObjects\StringLiteral\StringLiteral
Résultat ValueObjects\StringLiteral\StringLiteral

Property Details

$ellipsoid protected_oe property

protected Ellipsoid,ValueObjects\Geography $ellipsoid
Résultat ValueObjects\Geography\Ellipsoid

$latitude protected_oe property

protected Latitude,ValueObjects\Geography $latitude
Résultat ValueObjects\Geography\Latitude

$longitude protected_oe property

protected Longitude,ValueObjects\Geography $longitude
Résultat ValueObjects\Geography\Longitude