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:
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:
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.
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.
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.
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.
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.
I can be contacted as user Rogerc on the Open Street Map site, or directly as jrogercalvert@gmail.com
Last updated 12/01/2023
http://www.rogercalvert.me.uk | http://www.ctpress.co.uk |