Geo::Coordinates::OSTN02 -- Implement the OSTN02 transformation


NAME

Geo::Coordinates::OSTN02 -- Implement the OSTN02 transformation

Version: 2.00


SYNOPSIS

  use Geo::Coordinates::OSTN02 qw/OSGB36_to_ETRS89 ETRS89_to_OSGB36/;
  ($x, $y, $z) = OSGB36_to_ETRS89($e, $n, $h);
  ($e, $n, $h) = ETRS89_to_OSGB36($x, $y, $z);


DESCRIPTION

The purpose and use of these modules is described briefly in the companion the Geo::Coordinates::OSGB manpage modules. In essence they implement in Perl the Ordnance Survey's OSTN02 transformation which is part of the current definition of the British National Grid. You are strongly recommended to read the official public guides and other introductory documents that are published by the Ordnance Survey of Great Britain with a wealth of other technical information about the OSTN02 transformation. The best starting point on the web is http://www.ordnancesurvey.co.uk/oswebsite/gps/information/index.html


FUNCTIONS

The following functions can be exported from the Geo::Coordinates::OSTN02 module:

    OSGB36_to_ETRS89
    ETRS89_to_OSGB36

None is exported by default.

OSGB36_to_ETRS89(easting, northing, [elevation])
Transforms from normal OSGB36 grid references to a pseudo-grid based on the WGS84/ETRS89 geoid model, which can then be translated to lat/long coordinates using grid_to_ll() with the 'WGS84' parameter.
   my $elevation = '100'; # in metres
   my ($e, $n) = parse_grid_trad('TQ304293');
   my ($x, $y, $z) = OSGB36_to_ETRS89($e, $n, $elevation);
   my ($lat, $lon) = grid_to_ll($x, $y, 'ETRS89'); # or you can say 'WGS84' if you like - same thing

Elevation will default to 0 metres if you omit it.

ETRS89_to_OSGB36(x, y, [z])
Transforms WGS84/ETRS89 pseudo-grid coordinates into OSGB36 grid references.
  my ($lat, $lon, $height) = (51.5, -1, 10); # Somewhere in London
  my ($x, $y) = ll_to_grid($lat, $lon, 'ETRS89'); # or 'WGS84'
  my ($e, $n, $elevation) = ETRS89_to_OSGB36($x, $y, $height);


BUGS

Please report any to toby@cpan.org


EXAMPLES

See the test routines included in the distribution.


AUTHOR

Toby Thurston --- 4 Sep 2007

web: http://www.wildfire.dircon.co.uk


SEE ALSO

See the Geo::Coordinates::OSGB manpage for the main routines.

 Geo::Coordinates::OSTN02 -- Implement the OSTN02 transformation