Add OSTN15 to QGIS 2.16

As you may be aware, the United Kingdom has a new transformation model that is OSTN15…..But why? What does it mean to the geospatial community?

Without being too nerdy, tectonic plate movement means that the “model” surface (the geoid) is slowly moving from best fit for the coordinate system. It has been 13yrs since Ordnance Survey implemented OSTN02 so the shift since then is enormous…..a whole 1cm and vertically it is 2.5cm. See this article here from Ordnance Survey.

The whole story is that sensors and our ability to calculate our positi0n relative to both the mathematical models and our relative position to those is constantly evolving too. So, just as OSTN02 revolutionised the accuracy of projecting GPS (WGS84) coordinates using a grid transformation (250 points over the 7 parameters used until 2002), OSTN15 both uses the OS Net of 250 points but has also been improved further with 12 zero order stations with accuracy of 2mm horizontal and 6mm vertical.

So how will this change the way you use your GIS?

If you are already using OSTN02 for your transformations between EPSG 27700 and EPSG 4326 – then you will only see a 5cm improvement over a 1m area at best and this is based on the worst places in the UK, on average you will only see a 2cm improvement anywhere in the UK. To put this into context, when you are zoomed in to an A3 map to about 1:100, you are talking about a few pixels on the screen….it won’t be groundbreaking [at the moment].

Currently, as this goes to press, the OSTN15 transformation has only been available for a few weeks and it is still being tested on different software to ensure it works, I am told that ESRI UK have been testing it with their software as this is being written.

As with OSTN02, I’ve created a fix for QGIS and OSTN15, I will describe how to implement this further in this.

It’s all about the Proj

Proj (Proj.4) is a cartographic library which is based on the work of Gerald Evenden of USGS back circa 1980. Over time it has evolved to consume grid transformations and is used by GRASS GIS, MapServer, PostGIS, Thuban, OGDI, Mapnik, TopoCad,GDAL/OGR as well as QGIS.

There are many ways to use proj, without a GIS you can use it through a command line by defining parameters. QGIS uses the proj library by accessing a spatialite database called srs.db. This is held at .appsqgisresourcessrs.db in Windows and Linux.

The proj spatialite database is a relational database which, when analysed, holds tables for coordinate systems, epsg codes & transformations. What is really clever is that it recognises direction of transformation.

Why is direction important?

Most coordinate transformations go from the projected coordinate system to the geographic coordinate system, for example epsg 4277 to epsg 4326, OSTN15 bucks the trend and is the reverse direction, from 4326 to 4277.

As I found when I first tested OSTN15 with QGIS, I was getting a uniform 200m shift in the data which was being translated and I was really confused. After talking with the gridfile creator, I discovered that the file was created from ETRS89 to OSGB36, therefore the 200m shift I was getting.

QGIS is awesome, you’ve probably overlooked just how clever it is and so did I. Next time you run a transformation, or when you try this one, you may notice that there are 2 fields noted in the columns SRC (source) and DST (destination)…and this is a godsend for solving this issue, as QGIS can read the coordinate in both directions.


Show us the magic

So, I talked with Ordnance Survey and found that OSTN15 has been given the epsg of 7709 and created a new record with the srs.db which is distributed with Windows, Linux & Mac releases. To utilise this, all you need to do is to download the OSTN15 file from Ordnance Survey (here) and then place the OSTN15_NTv2.gsb file in the shared projections folder .shareprojOSTN15_NTv2.gsb this has been found to be correct in Mac and Windows (there should be similar in Linux). You know it is the right folder as there should be other .gsb files in there!


You can download the updated srs.db from here, this should be placed in the resources folder which can be found at  .appsqgisresourcessrs.db – I highly recommend changing the name of the srs.db file in this folder to something like srs.db.old before adding the new version, just in case it doesn’t work for your particular set up BUT it has been checked on Mac and Windows distributions of QGIS from version 2.12 through to QGIS 2.17.




Many thanks to Ordnance Survey for their help

Further reading about the model for Great Britain and OSTN15, I recommend this paper: A guide to Coordinate systems in Great Britain


  1. Thanks for the post just came across it as I was researching using OSTN02 transformations in QGIS, one thing i noticed is that the linked file from Ordnance Survey now comes with two gsb files, OSTN15_NTv2_ETRStoOSGB.gsb and OSTN15_NTv2_OSGBtoETRS.gsb.

    1. Yes, OS now provide the transformation in both directions. Because QGIS is so flexible, you only require the one file, the software is able to distinguish which direction it is working between.
      Other Geospatial software now has OSTN15 also.

  2. Thanks NIc. I’m still a bit confused though – as Ian said, there’s two OSTN15 gsb files from OS, can one of these simply be renamed to OSTN15_NTv2.gsb? (if so, which one?)

    1. Hi,
      The 2 gsb (grid) files relate to the direction of transformation. If you note the names, they are named OSGB to ETRS89 and also ETRS89 to OSGB.
      This is partially due to some GIS software requiring both files to transform the information in both directions.
      For QGIS I have found that only one file is needed as it recognises the direction of transformation and works accordingly.
      So, in answer to your question, yes, you should be able to just rename one file and it will work. Personally, I chose the ETRS89 to OSGB

  3. Hi,
    I have been playing around with raw proj 4 but it really matters which of the two files is used for the nadgrids parameters. Since the pro4 string describes the OSTN15 datum you should specify the file OSTN15_NTv2_OSGBtoETRS.gsb in your proj4 string. When I try the other gsb file the datum transformation is couple of 100 meters of.

    Example proj4:
    +ellps=airy +k_0=0.9996012717 +lat_0=49.000000000000 +lon_0=-2.000000000000 +proj=tmerc +nadgrids=C:\OSTN15_NTv2_OSGBtoETRS.gsb +x_0=400000.0000 +y_0=-100000.0000 +nodefs +wktext

    1. Hi
      Yes, direction matters when using the OSTN15 in proj4 directly. The blog refers more to the ability of the QGIS software to be able to determine direction and therefore not need both directions.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.