Documentation

LatLonRange
in package

Data structure to handle Latitude,Longitude bounding box

Table of Contents

Constants

earthRadius  = 6372.795

Properties

$max  : LatLon
$min  : LatLon
$validLatitude  : mixed
$validLongitude  : mixed

Methods

__construct()  : mixed
__destruct()  : mixed
__toString()  : string
Returns bounding box coordinates
distance()  : float
Get distance (in km) between the 2 points
isPointContained()  : bool
Check if a point (LatLon obj) is contained by the bounding box (this LatLonRange)
max()  : LatLon
Get max bouding box coordinates
min()  : LatLon
Get min bouding box coordinates
position()  : string
Get spatial position first point respect to second point possible values are: NO N NE O C E SO S SE
getCenterPosition()  : string
Get center position possible values are: O C E
getNorthPosition()  : string
Get north position possible values are: NO N NE
getSouthPosition()  : string
Get south position possible values are: SO S SE

Constants

Properties

$validLatitude

private mixed $validLatitude = array('min' => -180, 'max' => 180)

$validLongitude

private mixed $validLongitude = array('min' => -180, 'max' => 180)

Methods

__toString()

Returns bounding box coordinates

public __toString() : string
Return values
string

Bounding box in [%.5f,%.5f],[%.5f,%.5f] [min lat,lon],[max lat,lon] format

distance()

Get distance (in km) between the 2 points

public distance() : float
Return values
float

distance in km

isPointContained()

Check if a point (LatLon obj) is contained by the bounding box (this LatLonRange)

public isPointContained(LatLon $point) : bool
Parameters
$point : LatLon

point to check if is contained by the bounding box

Return values
bool

true if is contained by the bounding box, false otherwise

max()

Get max bouding box coordinates

public max() : LatLon
Return values
LatLon

Max bouding box coordinates

min()

Get min bouding box coordinates

public min() : LatLon
Return values
LatLon

Min bouding box coordinates

position()

Get spatial position first point respect to second point possible values are: NO N NE O C E SO S SE

public position() : string
Return values
string

position of first point respect to second point (see __construct())

getCenterPosition()

Get center position possible values are: O C E

private getCenterPosition() : string
Return values
string

position of first point respect to second point (see __construct())

getNorthPosition()

Get north position possible values are: NO N NE

private getNorthPosition() : string
Return values
string

position of first point respect to second point (see __construct())

getSouthPosition()

Get south position possible values are: SO S SE

private getSouthPosition() : string
Return values
string

position of first point respect to second point (see __construct())


        
On this page

Search results