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
|How to Make a Model Anderson Shelter|
|How to make a Model Roman Villa|
|How to Make a Tetrahedron|
|Octahedrons and how to draw their net|
|How to Create a Time Sheet in Excel|
|Handling time and dates in PHP|
|How to Enhance Photographs with the Gimp|
|How to Cook Pigeon|
|Telling the Time|
|An Old Travel Card|