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 AccessLatest Posts |
27/04/20 |
How to Make a Model Anderson Shelter |
25/04/20 |
How to make a Model Roman Villa |
15/04/20 |
How to Make a Tetrahedron |
07/04/20 |
Octahedrons and how to draw their net |
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 |