PHP 클래스 Location\Coordinate

저자: Marcus Jaschen ([email protected])
상속: implements location\GeometryInterface
파일 보기 프로젝트 열기: mjaschen/phpgeo 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$ellipsoid Ellipsoid
$lat float
$lng float

공개 메소드들

메소드 설명
__construct ( float $lat, float $lng, Ellipsoid $ellipsoid = null )
format ( Location\Formatter\Coordinate\FormatterInterface $formatter ) : mixed
getDistance ( Coordinate $coordinate, Location\Distance\DistanceInterface $calculator ) : float Calculates the distance between the given coordinate and this coordinate.
getEllipsoid ( ) : Ellipsoid
getLat ( ) : float
getLng ( ) : float
getPoints ( ) : array Returns an array containing the point

보호된 메소드들

메소드 설명
isNumericInBounds ( float $value, float $lower, float $upper ) : boolean Checks if the given value is (1) numeric, and (2) between lower and upper bounds (including the bounds values).
isValidLatitude ( mixed $latitude ) : boolean Validates latitude
isValidLongitude ( mixed $longitude ) : boolean Validates longitude

메소드 상세

__construct() 공개 메소드

public __construct ( float $lat, float $lng, Ellipsoid $ellipsoid = null )
$lat float -90.0 .. +90.0
$lng float -180.0 .. +180.0
$ellipsoid Ellipsoid if omitted, WGS-84 is used

format() 공개 메소드

public format ( Location\Formatter\Coordinate\FormatterInterface $formatter ) : mixed
$formatter Location\Formatter\Coordinate\FormatterInterface
리턴 mixed

getDistance() 공개 메소드

Calculates the distance between the given coordinate and this coordinate.
public getDistance ( Coordinate $coordinate, Location\Distance\DistanceInterface $calculator ) : float
$coordinate Coordinate
$calculator Location\Distance\DistanceInterface instance of distance calculation class
리턴 float

getEllipsoid() 공개 메소드

public getEllipsoid ( ) : Ellipsoid
리턴 Ellipsoid

getLat() 공개 메소드

public getLat ( ) : float
리턴 float

getLng() 공개 메소드

public getLng ( ) : float
리턴 float

getPoints() 공개 메소드

Returns an array containing the point
public getPoints ( ) : array
리턴 array

isNumericInBounds() 보호된 메소드

Checks if the given value is (1) numeric, and (2) between lower and upper bounds (including the bounds values).
protected isNumericInBounds ( float $value, float $lower, float $upper ) : boolean
$value float
$lower float
$upper float
리턴 boolean

isValidLatitude() 보호된 메소드

Validates latitude
protected isValidLatitude ( mixed $latitude ) : boolean
$latitude mixed
리턴 boolean

isValidLongitude() 보호된 메소드

Validates longitude
protected isValidLongitude ( mixed $longitude ) : boolean
$longitude mixed
리턴 boolean

프로퍼티 상세

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

protected Ellipsoid,location $ellipsoid
리턴 Ellipsoid

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

protected float $lat
리턴 float

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

protected float $lng
리턴 float