PHP Class OSRef, UK-Postcodes

Exibir arquivo Open project: pezholio/UK-Postcodes Class Usage Examples

Public Properties

Property Type Description
$easting
$northing

Public Methods

Method Description
OSRef ( $easting, $northing ) Create a new OSRef object representing an OSGB grid reference. Note that the parameters for this constructor require eastings and northings with 1m accuracy and need to be absolute with respect to the whole of the British Grid. For example, to create an OSRef object from the six-figure grid reference TG514131, the easting would be 651400 and the northing would be 313100.
toLatLng ( ) Convert this grid reference into a latitude and longitude
toSixFigureString ( ) Convert this grid reference into a string using a standard six-figure grid reference including the two-character designation for the 100km square. e.g. TG514131.
toSplitString ( )
toString ( ) Convert this grid reference into a string showing the exact values of the easting and northing.

Method Details

OSRef() public method

Grid references with accuracy greater than 1m can be represented using floating point values for the easting and northing. For example, a value representing an easting or northing accurate to 1mm would be given as 651400.0001.
public OSRef ( $easting, $northing )

toLatLng() public method

Convert this grid reference into a latitude and longitude
public toLatLng ( )

toSixFigureString() public method

Convert this grid reference into a string using a standard six-figure grid reference including the two-character designation for the 100km square. e.g. TG514131.
public toSixFigureString ( )

toSplitString() public method

public toSplitString ( )

toString() public method

Convert this grid reference into a string showing the exact values of the easting and northing.
public toString ( )

Property Details

$easting public_oe property

public $easting

$northing public_oe property

public $northing