PHP 클래스 ValueObjects\Geography\Coordinate

상속: implements ValueObjects\ValueObjectInterface
파일 보기 프로젝트 열기: nicolopignatelli/valueobjects 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$ellipsoid ValueObjects\Geography\Ellipsoid
$latitude ValueObjects\Geography\Latitude
$longitude ValueObjects\Geography\Longitude

공개 메소드들

메소드 설명
__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

보호된 메소드들

메소드 설명
getBaseCoordinate ( self $coordinate ) : Coordinate Returns the underlying Coordinate object

메소드 상세

__construct() 공개 메소드

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() 공개 메소드

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

distanceFrom() 공개 메소드

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
리턴 ValueObjects\Number\Real

fromNative() 공개 정적인 메소드

Returns a new Coordinate object from native PHP arguments
public static fromNative ( ) : self
리턴 self

getBaseCoordinate() 보호된 정적인 메소드

Returns the underlying Coordinate object
protected static getBaseCoordinate ( self $coordinate ) : Coordinate
$coordinate self
리턴 League\Geotools\Coordinate\Coordinate

getEllipsoid() 공개 메소드

Returns ellipsoid
public getEllipsoid ( ) : ValueObjects\Geography\Ellipsoid
리턴 ValueObjects\Geography\Ellipsoid

getLatitude() 공개 메소드

Returns latitude
public getLatitude ( ) : ValueObjects\Geography\Latitude
리턴 ValueObjects\Geography\Latitude

getLongitude() 공개 메소드

Returns longitude
public getLongitude ( ) : ValueObjects\Geography\Longitude
리턴 ValueObjects\Geography\Longitude

sameValueAs() 공개 메소드

Tells whether tow Coordinate objects are equal
public sameValueAs ( ValueObjects\ValueObjectInterface $coordinate ) : boolean
$coordinate ValueObjects\ValueObjectInterface
리턴 boolean

toDecimalMinutes() 공개 메소드

Returns a decimal minutes representation of the coordinate
public toDecimalMinutes ( ) : ValueObjects\StringLiteral\StringLiteral
리턴 ValueObjects\StringLiteral\StringLiteral

toDegreesMinutesSeconds() 공개 메소드

Returns a degrees/minutes/seconds representation of the coordinate
public toDegreesMinutesSeconds ( ) : ValueObjects\StringLiteral\StringLiteral
리턴 ValueObjects\StringLiteral\StringLiteral

toUniversalTransverseMercator() 공개 메소드

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

프로퍼티 상세

$ellipsoid 보호되어 있는 프로퍼티

protected Ellipsoid,ValueObjects\Geography $ellipsoid
리턴 ValueObjects\Geography\Ellipsoid

$latitude 보호되어 있는 프로퍼티

protected Latitude,ValueObjects\Geography $latitude
리턴 ValueObjects\Geography\Latitude

$longitude 보호되어 있는 프로퍼티

protected Longitude,ValueObjects\Geography $longitude
리턴 ValueObjects\Geography\Longitude