Great Britain National Grid

The one kilometre grid lines of the Great Britain National Grid, as printed on Ordnance Survey maps, have been converted to 'ways' in an OSM format xml file. The grid points were converted to latitude and longitude by the following process:

  1.  Converting them to latitude and longitude on the OSGB36 (Airy 1830) ellipsoid, using code adapted from http://www.movable-type.co.uk/scripts/latlong-gridref.html.
  2.  Transforming the latitude and longitude from the OSGB ellipsoid to the WGS84/GRS80 ellipsoid using a Helmert transformation, using code adapted from http://www.movable-type.co.uk/scripts/latlong-convert-coords.html.

The range covered is (0E, 0N) to (660E, 1220N) (in kilometres). This covers the whole of the UK including islands (except the Channel Islands).

The 100 km grid squares which do not show UK land (they show part of Ireland, France or just empty sea) have been removed. This reduces the file size by about 35%. A screen dump from MapSource showing the 100km and 10km lines is available here.

The file size is about 27MB before compression, and has been reduced for the same coverage by:

  1. omitting many internal nodes (about 3 out of 4 on any one line, reducing the number of nodes by about half). This has negligible effect on the result, since the grid lines are so close to straight lines over a few kilometres.
  2. reducing the number of decimal places in the node locations from 17 to 7 (this still gives much better than 1 metre calculation resolution).

Some utilities (e.g. Osmosis) expect OSM XML format version 0.6, rather than version 0.5. The critical difference seems to be that nodes and ways must have a version attribute in 0.6. This significantly increases the file size. The download package includes both 0.5 and 0.6 versions.

File Use

The GBGrid.osm file is compatible with Open Street map XML files, and may be compiled by mkgmap (and probably other utilities - not tested) to make Garmin .img files. The node and way IDs are well clear of those in OSM - arround 9E11, while OSM IDs range up to about 2E9.

The lines are tagged with 'name= 250E' or 'name=100N' and 'national_grid=1km' (or '10km' or '100km'), according to the line concerned.

In compiling with mkgmap, the folllowing or similar rules may be used in the 'lines' style file:

national_grid=100km [0x10302 level 3]
national_grid=10km [0x10301 level 2]
national_grid=1km [0x10300 level 1]
national_grid=* [0x10302 level 3]

These codes are not apparently used for other purposes. They are the same as I have used for the Latitude and Longitude (see http://rogercalvert.me.uk/OSM/LatLong – I assume that users are unlikely to require both grid lines and lat/long lines.

Corresponding entries are also required in the style.typ file. A sample to include in the style.txt file (which mkgmap will use to generate the style.typ file) is available here.


 
 

License

These files may be freely used for any non-commercial purpose, and redistributed freely. In any redistribution, this license and the disclaimer below must be included unchanged.

Disclaimer

These data are believed to be correct and to be compatible with Open Street Map and Garmin formats. However, the author can take no responsibility for any errors or incompatibilities which may be present, or for the consequences of such errors or incompatibilities. It is up to the user to determine whether the data are suitable for his/her purposes.

Acknowledgements

I am grateful to Chris Veness (http://www.movable-type.co.uk) for doing all the hard work of coding the coordinate conversions, and to various people on the Open Street Map email lists for advice and guidance.

Contact

I can be contacted as user Rogerc on the Open Street Map site, or directly as jrogercalvert@gmail.com

Last updated  12/01/2023


Downloaded 1294 times
 

Valid XHTML 1.0 Transitional

steamboat icon http://www.rogercalvert.me.uk CTP icon http://www.ctpress.co.uk