PHP Class LatLng, UK-Postcodes

Datei anzeigen Open project: pezholio/UK-Postcodes Class Usage Examples

Public Properties

Property Type Description
$lat
$lng

Public Methods

Method Description
LatLng ( $lat, $lng ) Create a new LatLng object from the given latitude and longitude
OSGB36ToWGS84 ( ) Convert this LatLng object from OSGB36 datum to WGS84 datum.
WGS84ToOSGB36 ( ) Convert this LatLng object from WGS84 datum to OSGB36 datum.
distance ( $to ) : the Calculate the surface distance between this LatLng object and the one passed in as a parameter.
toOSRef ( ) : the Convert this LatLng object into an OSGB grid reference. Note that this function does not take into account the bounds of the OSGB grid - beyond the bounds of the OSGB grid, the resulting OSRef object has no meaning
toString ( ) : a Return a string representation of this LatLng object
toUTMRef ( ) : the Convert a latitude and longitude to an UTM reference

Method Details

LatLng() public method

Create a new LatLng object from the given latitude and longitude
public LatLng ( $lat, $lng )

OSGB36ToWGS84() public method

Convert this LatLng object from OSGB36 datum to WGS84 datum.
public OSGB36ToWGS84 ( )

WGS84ToOSGB36() public method

Convert this LatLng object from WGS84 datum to OSGB36 datum.
public WGS84ToOSGB36 ( )

distance() public method

Calculate the surface distance between this LatLng object and the one passed in as a parameter.
public distance ( $to ) : the
return the surface distance

toOSRef() public method

Convert this LatLng object into an OSGB grid reference. Note that this function does not take into account the bounds of the OSGB grid - beyond the bounds of the OSGB grid, the resulting OSRef object has no meaning
public toOSRef ( ) : the
return the converted OSGB grid reference

toString() public method

Return a string representation of this LatLng object
public toString ( ) : a
return a string representation of this LatLng object

toUTMRef() public method

Convert a latitude and longitude to an UTM reference
public toUTMRef ( ) : the
return the converted UTM reference

Property Details

$lat public_oe property

public $lat

$lng public_oe property

public $lng