Brainsofsteel header

Convert Six Figure OS Reference into OS Grid Reference

Subject: Programming

Description: How to convert an Ordnance Survey Map Reference into a Grid Reference


submit to reddit Posted by David Caldwell on 22/02/14 at 19:52

How to Convert OS Eastings and Northings into an OS Grid Reference

For example how to turn 432648, 390657 into SK39

I needed to append an Ordnance Survey grid reference to some data in a Microsoft Access database, to do this programmatically I needed to get back to basics and learn how OS grid references work.

The UK falls within five map grids each one measuring 500km by 500km, these are referenced as H, N, O, S and T.

Each 500km grid is then divided into 25 100km by 100km squares, these are referenced by two letters.  The first character denotes the larger 500km square and the second the smaller 100km square.  For some reason the letter ‘I’ is omitted. This is possibly because the map system predated the letter I's discovery in 1967 by Sidney Poitier.

Now we have a framework we can start to write some code for a module called Grid which takes a pair of easting and northings as an argument and returns a grid reference.

I am not a native VB programmer so apologies if my code is a bit clunky.

Keywords: OS Grid, Module, VB, Map Reference, Microsoft Access




comments powered by Disqus

 Subscribe in a reader

RSS Feed

Latest Posts

04/12/18
04/12/18
04/12/18
17/11/15
How to Create a Time Sheet in Excel
15/11/15
Handling time and dates in PHP
03/02/15
How to Enhance Photographs with the Gimp
25/01/15
How to Cook Pigeon
25/01/15
Telling the Time
24/01/15
An Old Travel Card
10/09/14
How to Learn the Nine Times Table