5

I have seen numerous questions of this nature and all suggest incorrect assignment of CRS along the way. I feel I have tried every combination of relevant CRS values but still cannot load two particular vector layers such that they line up. I must be missing a trick somewhere.

The two layers come from OS: AddressBase Plus and Mastermap Topography. Specifically, I am trying to align the Address dataset with the Topographic Area dataset.

I can load them into FME Data Inspector and the address points align with buildings, but load them into QGIS and they are a few metres out.

When I check the CRS in FME it is reported as EPSG:27700 for both datasets, although oddly the Coordinate System for the address is labelled EPSG:27700 whilst the Topographic Areas is labelled BritishNatGrid (comparing the WKT shows they are identical, though).

When I load these datasets into QGIS, without specifying the CRS, it sets it to 27700 for the Topographic Areas, but 4326 for the Addresses. I don't understand why.

I have tried every combination (I believe I have) of setting the project CRS to different values, assigning different values to each layer, and turning OTF on and off, but to no avail.

Most things I try put the addresses off the coast of West Africa (I presume at lat/lon 0, 0), and the Topographic Areas are nowhere to be seen. The only combination that puts them even vaguely in the same vicinity as each other is with Addresses 4326 and Topographic Areas 27700, but they remain misaligned by a few metres.

Can anyone suggest a straightforward process for loading these datasets into QGIS so that they align?

Here is the WKT from FME (which aligns correctly). It is the same for both files:

PROJCS["British National Grid (ORD SURV GB)", GEOGCS["OSGB 1936", DATUM["OSGB_1936", SPHEROID["Airy, 1830",6377563.396,299.3249612664953, AUTHORITY["EPSG","7001"]], AUTHORITY["EPSG","6277"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4277"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",49], PARAMETER["central_meridian",-2], PARAMETER["scale_factor",0.9996012717], PARAMETER["false_easting",400000], PARAMETER["false_northing",-100000], UNIT["METER",1], AUTHORITY["EPSG","27700"]]

The results from ogrinfo are:

Metadata: DESCRIPTION=Ordnance Survey (c) Crown Copyright. All rights reserved, 2016 and produced by GeoPlace

Layer name: Address Geometry: Point Feature Count: 41206 Extent: (-0.135610, 51.323120) - (-0.062560, 51.369150) Layer SRS WKT: GEOGCS["ETRS89", DATUM["European_Terrestrial_Reference_System_1989", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6258"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4258"]]

Metadata: DESCRIPTION=Ordnance Survey, (c) Crown Copyright. All rights reserved, 2016-04-05

Layer name: TopographicArea Geometry: Polygon Feature Count: 99404 Extent: (529039.110000, 159261.400000) - (535629.000000, 165876.100000) Layer SRS WKT: PROJCS["OSGB 1936 / British National Grid", GEOGCS["OSGB 1936", DATUM["OSGB_1936", SPHEROID["Airy 1830",6377563.396,299.3249646, AUTHORITY["EPSG","7001"]], TOWGS84[446.448,-125.157,542.06,0.15,0.247,0.842,-20.489], AUTHORITY["EPSG","6277"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4277"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",49], PARAMETER["central_meridian",-2], PARAMETER["scale_factor",0.9996012717], PARAMETER["false_easting",400000], PARAMETER["false_northing",-100000], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], AUTHORITY["EPSG","27700"]]

  • Welcome to GIS:SE @ckl! For the Addresses layer, when you load it into QGIS, right-click the layer and use the Save As... option. Specify the CRS as 27700 and create the new shapefile. See if this aligns better. – Joseph Sep 8 '16 at 9:31
  • Hi Joseph, thanks for the reply. I have just tried that but the new shape file places the address points in exactly the same place. – ckl Sep 8 '16 at 10:17
5

The extent of the Adress database is reported as `(-0.135610, 51.323120) - (-0.062560, 51.369150). This is surely NOT EPSG:27700 British National Grid (using meters), rather something in degrees.

Ogrinfo reports EPSG:4258, which is almost identical to EPSG:4326, and looks reasonable for the given extent. Alternatively, it could be EPSG:4277 OSGB36 in degrees, with a datum shift to WGS84. But that is even more offset to the EPSG:27700 data.

The Topographic Area extent might well be EPSG:27700 in meters.


UPDATE

The OS download page offers a sample dataset. Looking into the unnamed CSV columns, they contain both OSGB 27700 (in field 8 and 9) and degrees (in field 10 and 11). So when importing as delimited text, it is up to you which columns you take as coordinates. Both are not exactly matching (degrees in green and meters in red):

enter image description here

From the GML datasource (which has both coordinate sets too), QGIS is taking the degree values, while FME might take the meter values.

Ordnance Survey uses a different datum shift than QGIS uses to convert between 27700 and WGS84. They use a grid shift file, which you can download and store somewhere on your computer. Then you can build a custom CRS for EPSG:27700 based on that transformation:

 +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +nadgrids=F:\Karten\gdal\ntv2\OSTN02_NTv2.gsb +units=m +no_defs

Applying that to the 27700 data in meters (with the correct path to the file), the red points align perfectly to the green degree coordinates.

  • +1 for looking into the coordinate extents to see if the values make sense with the suggested CRS. – Alexandre Neto Sep 8 '16 at 11:24
  • Hi Andre. I tried setting it to 4258 and the address points remain in exactly the same place. Setting to 4277 they remain visible but are even further away from where they should be. – ckl Sep 8 '16 at 11:29
  • What would be the solution loading the files into QGIS if that is the case? When loading the address GML file QGIS doesn't give any options for which columns to use. – ckl Sep 8 '16 at 11:54
  • Since you have two choices, take the CSV. – AndreJ Sep 8 '16 at 12:59
  • The GML file coordinates are identical to my green (degree) ones. Again, both datasets are included, but QGIS takes the EPSG:4258 coordinates. – AndreJ Sep 8 '16 at 13:09
3

National Grid Transform ation OSTN02 (ETRS89–OSGB36) To cope with the distortions in the OSGB36 TRF, different transformations are needed in different parts of the country. For this reason, the national standard datum transformation between OSGB36 and ETRS89 is not a simple Helmert datum transformation.

Instead, Ordnance Survey has developed a ‘rubber-sheet’ style transformation on that works with a transformation grid expressed in easting and northing coordinates. The grids of northing and easting shifts between ETRS89 and OSGB36 cover Britain at a resolution of one kilometre. From these grids, a northing and easting shift for each point to be transformed is obtained by a bilinear interpolation. This is called the National Grid Transformation OSTN02, and it is freely available in software > packages from the Ordnance Survey GPS website,

https://www.ordnancesurvey.co.uk/business-and-government/products/os-net/index.html

The National Grid Transformation copes not only with the change of datum between the two coordinate systems, but also with the TRF distortions in the OSGB36 triangulation network

the Helmert type limited to applications at five metres and larger accuracy levels. This transformation removes the need to estimate local Helmert transformations between ETRS89 and OSGB36 for particular locations. Because the National Grid Transformation works with easting and northing coordinates, other ETRS89 coordinate types (3D Cartesian or latitude and lo ngitude) must first be converted to eastings and northings. This is done using the same map projec tion as is used for the National Grid (see section 7 below), except that the GRS80 ellipsoid rather than the Airy ellipsoid is used. The parameters and formulae required to obtain these ETRS89 eastings and northings are given in annexes A–C . After the transformation, the resulting National Grid easti ngs and northings can be converted back to latitude and longitude (this time using the Airy ellipsoid) if required.

source: http://www.bnhs.co.uk/focuson/grabagridref/html/OSGB.pdf

  • Thanks for this. Suddenly, it all makes sense. I tried to +1 but I don't have enough points. – ckl Sep 8 '16 at 16:52
  • You are right on that, but the implementation in QGIS needs some extra steps. I updated my answer. – AndreJ Sep 8 '16 at 17:06
1

When QGis opens the AddressBase file it is unable to determine the SRS and so guesses that it is EPSG:4326 (this is the default behaviour) which is of course wrong. The simple fix is to right click on that layer and select set Layer CRS and choose EPSG:27700 and click OK.

Your two layers will now line up.

To make life easier in the future (assuming that you mostly deal with UK data) you can set the default projection for unknown layers to be OSGB by going to settings->options->crs and choosing epsg:27700 in there.

enter image description here

  • Hi iant. I tried that, but the address points disappear off he tip of Cornwall, whereas they should be in south London. I also tried setting the QGIS defaults as per your screenshot, creating a new project and loading the files again, but the same thing happens. Charles. – ckl Sep 8 '16 at 10:31
  • are these shapefiles? – Ian Turton Sep 8 '16 at 10:32
  • ""I tried that, but the address points disappear off he tip of Cornwall""> that's an interesting behavior, usually the kind of things that makes me think something is not what is seems...Could it be that it's not exactly the EPSG : 27700 (OSGB 1936 / British National Grid) ? Like for example EPSG:7405 (OSGB36 / British National Grid + ODN height) ? I don't know about British grids, just a wild guess. – gisnside Sep 8 '16 at 10:43
  • The address dataset is in GML and the Topographic Areas are GZ. – ckl Sep 8 '16 at 10:44
  • 1
    Didn't work (too long). I'll add to question. – ckl Sep 8 '16 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.