junglejim wrote:hi folks,
can anyone help me with a function to convert os grid ref ( eg: TF123456 or TL6991 ) to 6 digit X and Y coords???
cheers
Jim.
I am assuming you are referring to the National Grid for Great Britain by Ordnance Survey.
The specification on how the grid ref is made up can be found at:
http://www.ordnancesurvey.co.uk/oswebsite/gi/nationalgrid/nationalgrid.pdf
Then you need to define what type of X/Y coordinate system and which type of mapping you want. This is a huge topic which occupies quite few people.
If you don't want to get down to the nitty gritty with respect to earth curvature my recommendation is that you need to find out each of the squares coordinates with respect to your chosen reference system and then make a two dimensional array with first index being the square name and the lower left corners x and y coordinate the other dimension. Then is it just a matter of following the specification, i.e the first three numbers are the easting and the following three are the northing with a resolution of 100 meters.
In your example, TL6991 is actually TL690910.
Maybe you are asking us if this list already exist?
If so my suggestion is go Googling.