PHP Class League\Geotools\Coordinate\Coordinate

Author: Antoine Corcy ([email protected])
Inheritance: implements League\Geotools\Coordinate\CoordinateInterface, implements JsonSerializable
Exibir arquivo Open project: toin0u/geotools Class Usage Examples

Protected Properties

Property Type Description
$ellipsoid Ellipsoid The selected ellipsoid.
$latitude double The latitude of the coordinate.
$longitude double The longitude of the coordinate.

Public Methods

Method Description
__construct ( Geocoder\Model\Address | array | string $coordinates, Ellipsoid $ellipsoid = null ) Set the latitude and the longitude of the coordinates into an selected ellipsoid.
getEllipsoid ( ) {@inheritDoc}
getLatitude ( ) {@inheritDoc}
getLongitude ( ) {@inheritDoc}
getPrecision ( ) : integer
isEqual ( Coordinate $coordinate ) : boolean Returns a boolean determining coordinates equality
jsonSerialize ( ) {@inheritDoc}
normalizeLatitude ( $latitude ) {@inheritDoc}
normalizeLongitude ( $longitude ) {@inheritDoc}
setFromString ( string $coordinates ) Creates a valid and acceptable geographic coordinates.
setLatitude ( $latitude ) {@inheritDoc}
setLongitude ( $longitude ) {@inheritDoc}
setPrecision ( integer $precision )

Private Methods

Method Description
toDecimalDegrees ( string $coordinates ) : array Converts a valid and acceptable geographic coordinates to decimal degrees coordinate.

Method Details

__construct() public method

Set the latitude and the longitude of the coordinates into an selected ellipsoid.
public __construct ( Geocoder\Model\Address | array | string $coordinates, Ellipsoid $ellipsoid = null )
$coordinates Geocoder\Model\Address | array | string The coordinates.
$ellipsoid Ellipsoid The selected ellipsoid (WGS84 by default).

getEllipsoid() public method

{@inheritDoc}
public getEllipsoid ( )

getLatitude() public method

{@inheritDoc}
public getLatitude ( )

getLongitude() public method

{@inheritDoc}
public getLongitude ( )

getPrecision() public method

public getPrecision ( ) : integer
return integer

isEqual() public method

Returns a boolean determining coordinates equality
public isEqual ( Coordinate $coordinate ) : boolean
$coordinate Coordinate
return boolean

jsonSerialize() public method

{@inheritDoc}
public jsonSerialize ( )

normalizeLatitude() public method

{@inheritDoc}
public normalizeLatitude ( $latitude )

normalizeLongitude() public method

{@inheritDoc}
public normalizeLongitude ( $longitude )

setFromString() public method

Creates a valid and acceptable geographic coordinates.
public setFromString ( string $coordinates )
$coordinates string

setLatitude() public method

{@inheritDoc}
public setLatitude ( $latitude )

setLongitude() public method

{@inheritDoc}
public setLongitude ( $longitude )

setPrecision() public method

public setPrecision ( integer $precision )
$precision integer

Property Details

$ellipsoid protected_oe property

The selected ellipsoid.
protected Ellipsoid,League\Geotools\Coordinate $ellipsoid
return Ellipsoid

$latitude protected_oe property

The latitude of the coordinate.
protected double $latitude
return double

$longitude protected_oe property

The longitude of the coordinate.
protected double $longitude
return double