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
- 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
Constants
earthRadius
private
mixed
earthRadius
= 6372.795
Properties
$max
private
LatLon
$max
$min
private
LatLon
$min
$validLatitude
private
mixed
$validLatitude
= array('min' => -180, 'max' => 180)
$validLongitude
private
mixed
$validLongitude
= array('min' => -180, 'max' => 180)
Methods
__construct()
public
__construct(LatLon $min, LatLon $max) : mixed
Parameters
__destruct()
public
__destruct() : mixed
__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
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())