I get different results using 2 methods to convert co-ordinates from WGS84, epsg:4326 to BNG (British National Grid) epsg:27700. The differences in the plotted eastings and northings values are very small resulting in a difference of approximately 0.5m.
The main reason I am concerned is that when I plot the converted points in QGIS the results from using pyproj are in the same location as the non transformed points from WGS84. Converting the WGS84 points on the fly in QGIS plots the points in the same location as those I converted using the OS software.
I may need to use pyproj in the future and would like to ensure I have used the software correctly.
I am using pyproj and Grid InQuest II software from the Ordnance survey to run the conversions.
WGS84 Co-ordinate set
- longitude = -3.209168460809744
- Latitude = 55.950621342577172
- Altitude = 116.378547668457031
pyproj result and code
x = 324588.97991822625 y = 673725.6892528223
trans1 = Transformer.from_crs("epsg:4326", "epsg:27700") x1, y1, z1 = trans1.transform (lat, lon, alt) print ("Transformer lon = " +str(lon), " lat = " + str(lat) + " x = " + str(x1) + " y = " + str(y1))
Ordnance Survey result
Easting = 324589.0436663538 Northing = 673726.1910941075
OS conversion validation
I have 3 conversion methods from the Ordnance Survey Website
- Grid InQuestII source code, used to create result above. https://www.ordnancesurvey.co.uk/business-government/tools-support/os-net/for-developers
- Grid InQuestII software, a stand alone application, same co-ordinates but rounded to 2 decimal places
- Online conversion page, same result to 3 decimal places. https://www.ordnancesurvey.co.uk/gps/transformation/
The OS website and code converts from from ETRS89, epsg:4937, not WGS84, epsg:4326. I did try using epsg:4937 in pyproj and got the same result as using epsg:4326.
OS comment on using ETRS89, EPSG:4937
In Europe, ETRS89 is a precise version of the better known WGS84 (EPSG code 4326) coordinate reference system optimised for use in Europe; however, for most purposes it can be considered equivalent to WGS84. Specifically, the motion of the European continental plate is not apparent in ETRS89, which allows a fixed relationship to be established between this system and Ordnance Survey mapping coordinate systems.
Rendering in QGIS
I plotted a .geojson file with my original WGS84 lat, long values to see how that location compared with the converted values. I load 2 .csv files, one with the OS conversion and one with the pyproj conversion.
Project Properties - Datum Transformations EPSG:4326 to EPSG:27700 selected
WGS84 points and OS points in same locations. pyproj points about 0.5m apart
Project Properties - Datum Transformations blank
WGS84 and pyproj points in same location This was the confusing result, I would have accepted a result where the OS conversion was slightly different from the pyproj conversion and the plotting of the WGS84 result was in a slightly different location.
Added images of project reference system and project properties