Geo-Coordinates-OSGB
view release on metacpan or search on metacpan
lib/Geo/Coordinates/OSGB/Background.pod view on Meta::CPAN
Strictly speaking, grid references are given as the distance in metres
from the False Point of Origin, with the easting always given before the
northing. For everyday use however, the OSGB suggest that grid
references need only to be given within the local 100km square as this
makes the numbers smaller. For this purpose they divide Britain into a
series of 100km squares, each identified by a pair of letters: TQ, SU,
ND, etc. The grid of the big squares actually used is something like
this:
HP
HU
HY
NA NB NC ND
NF NG NH NJ NK
NL NM NN NO NP
NR NS NT NU
NW NX NY NZ OV
SC SD SE TA
SH SJ SK TF TG
SM SN SO SP TL TM
SR SS ST SU TQ TR
SV SW SX SY SZ TV
SW covers most of Cornwall, TQ London, HU the Shetlands, and there is one
tiny corner of a beach in Yorkshire that is in OV. The system has the
neat feature that N and S are directly above each other, so that most Sx
squares are in the south and most Nx squares are in the north. The
system logically extends far out in all directions; so square XA lies
south of SV and ME to the west of NA and so on. But it becomes less
useful the further you go from the central meridian of 2W.
Within each of the large squares, we only need five-digit coordinates --- from
(0,0) to (99999,99999) --- to refer to a given square metre. But general use
rarely demands such precision, so the OSGB recommendation is to use units of
100m (hectometres) so that we only need three digits for each easting and
northing --- (000,000) to (999,999). If we combine the easting and northing we
get the familiar traditional six figure grid reference. Each of these grid
references is repeated in each of the large 100km squares but this does not
usually matter for local use with a particular map. Where it does matter, the
OS suggest that the six figure reference is prefixed with the identifier of the
large grid square to give a `full national grid reference', such as TQ330800.
This system is described in the notes in the corner of every Landranger
1:50,000 scale map.
This system was originally devised for use on top of the OSGB36 model of
latitude and longitude, so the prime meridian used and the coordinates
of the true point of origin are all defined in that system. However as
part of standardizing on an international GPS system, the OS have
redefined the grid as a rubber sheet transformation from WGS84.
There is no intrinsic merit to using one model or another, but there's
an obvious need to be consistent about which one you choose, and with
the growing ubiquity of GPS systems, it makes sense to standardize on
WGS84.
The grid remains the primary reference system for use with maps, but
the OS has always also printed a latitude and longitude `graticule' around the
edges of the large scale sheets. Traditionally these coordinates have been
given in the OSGB36 model, but since 2015 the OS has been printing revised
editions of Explorer and Landranger sheets with WGS84 coordinates instead.
The legend of my recently purchased copy of Explorer 311 has this paragraph under the
heading `The National Grid Reference System':
=over 4
=item * Base map constructed on Transverse Mercator Projection, Airy Ellipsoid, OSGB (1936) Datum.
Vertical datum mean sea level. The latitude, longitude graticule overlay is on the ETRS89 datum
and is compatible with the WGS84 datum used by satellite navigation devices.
=back
If your map does not have the last sentence you can assume that it shows OSGB36
latitude and longitude. Of course, this change makes no difference to the grid
itself.
The differences between the OSGB36 and WGS84 models are only important if you
are working at a fairly small scale. The average differences on the ground
vary from about -67 metres to + 124 meters depending on where you are in the
country.
Square Easting difference Northing difference
-------------------- ------------------------- ------------------
HP 109 66
HT HU 100 106 59 62
HW HX HY 73 83 93 51 48 47
NA NB NC ND 61 65 81 89 40 39 38 40
NF NG NH NJ NK 57 68 79 92 99 30 29 28 26 26
NL NM NN NO 56 66 79 91 18 17 15 15
NR NS NT NU 66 77 92 100 3 2 1 0
NW NX NY NZ 70 77 92 103 -9 -8 -10 -13
SC SD SE TA 77 93 104 112 -19 -22 -23 -24
SH SJ SK TF TG 79 91 103 114 124 -35 -34 -35 -38 -40
SM SN SO SP TL TM 72 80 90 101 113 122 -49 -47 -46 -46 -46 -47
SS ST SU TQ TR 80 90 101 113 121 -57 -56 -57 -57 -59
SW SX SY SZ TV 71 79 90 100 113 -67 -64 -62 -62 -62
The chart above shows the mean difference in each grid square. A
positive easting difference means the WGS84 Lat/Lon is to the east of
OSGB36; a positive northing difference means it is to the north of
OSGB36. At a scale of 1:50,000, 124 meters is 2.48 mm, and at 1:25,000
it is 4.96 mm, so the difference is readily visible if you compare new
and old editions of the same map sheet.
The transformation from WGS84 to OSGB36 published in 2002 was called OSTN02 and
consisted of a large data set that defined a three dimensional shift for each
square kilometre of the country. This dataset was revised (apparently to give
a better fit) in 2015 and the revised dataset is called OSTN15.
To get from WGS84 latitude and longitude to the grid, you project from the
WGS84 ellipsoid to a pseudo-grid and then look up the relevant shifts from
OSTN15 and adjust the easting and northing accordingly to get coordinates in
the OSGB grid. Going the other way is slightly more complicated as you have to
use an iterative approach to find the latitude and longitude that would give
you your grid coordinates.
It is also possible to use a three-dimensional shift and rotation called
a Helmert transformation to get an approximate conversion. This
approach is used automatically by these modules for locations that are
undefined in OSTN15, and, if you want to, you can explicitly use it
anywhere in the UK by using the C<grid_to_ll_helmert> and
( run in 2.041 seconds using v1.01-cache-2.11-cpan-e93a5daba3e )