The National Grid Converter tool converts Ordnance Survey grid references into pairs of coordinates. Two versions of the National Grid Converter are available: one for use with Windows and one for use on a UNIX platform. The National Grid Converter is available free to Digimap users.
Files of coordinate pairs are useful as they can be easily geocoded by a GIS into a data layer of points.
Grid references show a range of precisions, all of which can be processed by the converter into coordinates (given in metres).
|TA||100 km by 100 km square|
|TA04||10 km by 10 km square|
|TA04SW||5 km by 5 km square|
|TA0343||1 km by 1 km square|
|TA0343SW||500m by 500m square|
|TA034434||100m by 100m square|
|TA03434340||10m by 10m square|
|TA0343543405||1m by 1m square|
To download the NGConv.exe file simply right click on the link below and save it to your computer in a suitable location (e.g. C:\NGConv).
Figure 1: DOS Interface.
The grid reference TA034434 has been entered and the coordinates 503400, 443400 have been returned.**
If you require coordinates for a different corner of the grid square or for its centre?
The command displayed in Figure 2:
Figure 2- Run interface.
There are several other point options outlined below:
By starting the converter with one of these options all the coordinates generated in that session will be for the point specified in the command. The converter will look exactly the same as the one started by double clicking the icon but will produce results dependent on the options set.
To change these default settings the converter will need to be started from the Run prompt in the start menu. To do this you need to know the location of NGconv.exe (its file path). It also helps to store your text file of grid references (gridref.txt in this example) in the same folder as the NGConv application is stored. Type the file path followed by NGconv and the options that you want, then the name of the text file containing the list of grid references.
For example: D:\ngc\ngconv -includengr gridref.txt
As well as varying the point to output as outlined in the single grid reference section above there are other options available when outputting data to a csv file.
These options can be used in conjunction with each other or with the point modifiers listed above in the single grid reference conversion section. It is also possible to specify files to convert and to output to that are not in the same folder as the converter.
D:\ngc\ngconv -o coords.csv D:\ngc\textfiles\gridref.txt
This command will:
Note: You must specify full pathnames for the files. If you specify a path for the input file and you want to change the name of the output file you need to specify a path name for this too to avoid it being placed in the same folder as the converter.
The National Grid Converter is available free to Digimap users as a PERL script. To download the NGConv.pl file simply right click on the link below and save it to your computer in a suitable location.
The converter can be used for quick queries, converting grid references as they are typed in at the prompt. It is also possible to use the converter to produce files of coordinates from lists of grid references.
For usage options enter: NGconv.pl -help,
This will generate the information shown in Figure 4 below:
To convert a grid reference to a coordinate type: NGconv.pl
You will be prompted for a grid reference and the coordinate pair will be returned once you enter it as shown in Figure 5.
To vary the point for which the converter produces coordinates you can start the converter with one of the point options outlined below:
The converter can be used to convert lists of grid references to coordinates if they are saved as a text (.txt) file with each grid reference on a new line.
To convert the file you need to specify its name and location when starting the converter e.g. this example would read the gridref.txt file from the textfiles folder.: NGconv.pl textfiles\gridref.txt
To add the grid references into the .csv file as an initial value before the coordinate pair, use the option: -includengr
Figure 7 shows the difference between two .csv files created with and without the -includengr option.
The option -o allows you to specify a name for the output file. You can also specify a path for the file placing it in a different folder from the text file.
All these options can be used in conjunction with each other e.g.: NGconv -v -o csvfiles\coords.csv textfiles\gridref.txt
In the example the above:
to improve your experience using the service. This includes anonymised Google Analytics data.
We won't share your data with anyone else.