I'm sure this is an old chestnut, but does anyone know of an .mbx which will update a column with a ?British National Grid Reference based on easting and northing columns (one of easting and one of northing). Nothing I know of seems to do this.
Hi @Jane Mason?
There is the Co-ordinate Extractor supplied with MapInfo - found under the Tool Manager, if you are using 32-bit MapInfo. It even sets up the new columns and choice of projection.?
Thanks, John - what I'm after though is conversion to BNG reference from eastings and northings (e.g. 568300 236500 to TL683365), and vice versa.
Ah ha - terminology. The x and y coordinates are what I would term BNG - the other being more like an OS map reading term. 4-figure, 6-figure, 8-figure or 10-figure??
Well, 6-figure would excellent, but to be able to vary output would be ideal!?
@Jane Mason? I am not aware of a MapInfo tool to do this but this spreadsheet from OS does what you are after... might take you a while to do multiple easting/northings though! You might be able to use the VB code from the spreadsheet to work out how to do it in MapBasic?
Many thanks Alistair - yes, the VB code might help with batch processes. Thanks?
Many years ago, I wrote some MapBasic code that did the conversion (both ways). I think I still have the code on a CD at home, so will check tonight.
Thanks very much, Greg. That would be very useful.?
Hi Jane, Here's the MapBasic mbx - it's from 2005, so will probably only run on older versions (32-bit) of MapInfo. The code will add a column to the selected table and populate this with the OS map reference - SU12349876. I could provide the source code but I'll need to hunt around as the code references another library of functions and I couldn't find this, but I'm sure it's somewhere on my PC!
?Thanks very much, Greg - that works! It adds a column and populates it with the 6-figure OS grid reference. Thanks for your help.