OS GridRefs to WGS84                16th Feb 2008 01:20       

Put your Grid Ref here.       WGS84 Latitude longitude

Irish Grid to WGS84

The Irish Grid Ref here.       WGS84 Latitude longitude

Extract from text.          


TypeT:ScaleN:RegionR:GlobeG:SourceS: Template:
Gridref:          
WGS84  Lat:
WSG84 Lon:
WSG84 pair:
Commons: 
en: inline:    
en: Title :    
microformat span :    
microformat abbr :    
custom format :         

Open two instances of your browser- one for this page and one for the page you are editing. Highlight the OSGridRef on the edit page. (Ctrl-C) to copy. Switch to this page- Paste the value into the first box (Ctrl-V). Click on the 'convert' button. Select the tag you want, highlighting the box, (Ctrl-C) to copy. Switch to the Edit Page- Highlight the OSGridRef, and paste (Ctrl-V). If you are working with the Irish grid, use the second row of input boxes. You can add options to the :en: tags, or define you own 'custom' tag, using the next set of boxes. These can be saved and recalled.

The program will ignore spaces, punctuation and general silliness, and translates the OSGrid refs into WGS84 longitude and latitude. These are then written into the sort of (template) code that Wikipedia expects. Note: There is an accuracy limitaion of about 7m in all datum convertors, and 7m in the surveying of Ordnance Survey maps. The program allows free text, so a Commons location tag, can be pasted in the free text box, and the latitude and longitude will be extracted, this can then back convert to a Grid reference if it is valid. The Gridref should be trimmed manually to the required precision ,because this sets the number of decimal places in the output.

Back convertors allow you to check references. Only the forward convert writes to the templates.

The precision of the result depends on whether the OSGrid refs are 4, 6, 8, or 10 figure.

Extract from text, looks for known patterns and extracts the latitude and longitude, which can be converted to a gridrefs, which can them be used further.

This program is written on a single web page, so you can save it using File>Save As to your desktop for future use.

To use the custom box, type in your text into the template using {{{lat}}} {{{lon}}} {{{gridref2}}} {{{gridref}}} as place markers.{{{gridref2}}} is prettier, it has embedded formatting spaces.

What is a grid reference anyway?See also A guide to coordinate systems in Great Britain (or PDF).


Copyright \A9 2008 Clem Rutter, Rochester,Kent, Wikipedia User who acknowledges that most of the real work was already done. Sizeable chunks, and all the nasty maths from Paul Dixon Copyright \A9 2005 .Paul Dixon.Code derived from spreadsheet and converted to php by Ian Harris and Barry Hunter. Conversion accuracy is in the order of 7m for 90% of Great Britain. More accurate results can be obtained using the National Grid Transformation OSTN02.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licence as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public Licence for more details.