=== versions === python 3.12.0 | pyproj 3.8.0 (PROJ 9.8.1) | geopandas 1.2.0 | rasterio 1.5.2 (GDAL 3.12.2) | rioxarray 0.23.0 === Step 1: inspect CRSs by EPSG code === EPSG:4326 WGS 84 geographic datum: World Geodetic System 1984 ensemble axes: Lat (north, degree), Lon (east, degree) area of use: World. EPSG:27700 OSGB36 / British National Grid projected datum: Ordnance Survey of Great Britain 1936 axes: E (east, metre), N (north, metre) area of use: United Kingdom (UK) - offshore to boundary of UKCS within 49°45'N to 6 EPSG:3857 WGS 84 / Pseudo-Mercator projected datum: World Geodetic System 1984 ensemble axes: X (east, metre), Y (north, metre) area of use: World between 85.06°S and 85.06°N. EPSG:32630 WGS 84 / UTM zone 30N projected datum: World Geodetic System 1984 ensemble axes: E (east, metre), N (north, metre) area of use: Between 6°W and 0°W, northern hemisphere between equator and 84°N, ons === Step 2: transform one point (Manchester Town Hall) and the axis-order trap === strict, (lat, lon) in : E 383,854.7 N 398,099.0 strict, (lon, lat) in : E 7,854,183.6 N -5,967,512.6 <- swapped axes, silently wrong always_xy, (lon, lat) : E 383,854.7 N 398,099.0 round trip back to WGS 84: lon -2.244740, lat 53.479380 operation used: Inverse of OSGB36 to WGS 84 (9) + British National Grid (with axis order normalized for visualization) === Step 3: datum transformations, tested on NaPTAN bus stops === NaPTAN Greater Manchester: 21,527 access nodes, 13,187 active on-street bus stops with both lon/lat and easting/northing 9 candidate operations EPSG:4326 -> EPSG:27700, in PROJ's order (first = default): accuracy 1.0 m Inverse of OSGB36 to WGS 84 (9) accuracy 2.0 m Inverse of OSGB36 to WGS 84 (6) accuracy 21.0 m Inverse of OSGB36 to WGS 84 (1) accuracy 10.0 m Inverse of OSGB36 to WGS 84 (2) accuracy 21.0 m Inverse of OSGB36 to WGS 84 (3) accuracy 18.0 m Inverse of OSGB36 to WGS 84 (4) accuracy 35.0 m Inverse of OSGB36 to WGS 84 (5) accuracy 3.0 m Inverse of OSGB36 to WGS 84 (8) accuracy -1.0 m Ballpark geographic offset from WGS 84 to OSGB36 OSTN15 grid (EPSG default) vs NaPTAN easting/northing: median 0.31 m, 95th pct 0.61 m, max 0.91 m 7-parameter Helmert vs NaPTAN easting/northing: median 1.71 m, 95th pct 2.23 m, max 2.46 m proj string, no datum shift vs NaPTAN easting/northing: median 99.81 m, 95th pct 101.47 m, max 102.56 m rounding to whole metres alone: median 0.40 m, max 0.71 m === Step 4: reproject a GeoDataFrame (ONS boroughs, GeoJSON in WGS 84 -> EPSG:27700) === read 10 boroughs, CRS EPSG:4326, bounds -2.730, 53.327, -1.910, 53.686 to_crs(27700): CRS EPSG:27700, bounds 351,669, 381,153, 406,087, 421,038 set_crs(27700) by mistake: bounds -2.730, 53.327, -1.910, 53.686 -> a 0.82 x 0.36 m speck at lon -7.56, lat 49.77 (the BNG false origin) === Step 5: area and distance errors in the wrong CRS === warning from .area in EPSG:4326: Geometry is in a geographic CRS Greater Manchester, geodesic area on the WGS 84 ellipsoid: 1,276.89 km2 (ONS Shape__Area: 1,275.97 km2) EPSG:4326 (degrees) total = 0.1730 square degrees (not an area) EPSG:3857 total = 3,604.48 km2 error +182.285% EPSG:32630 total = 1,275.95 km2 error -0.074% EPSG:27700 total = 1,275.97 km2 error -0.073% Manchester Town Hall -> Wigan Town Hall, geodesic: 26,653.6 m EPSG:4326 (degrees) length = 0.39195 degrees (not a distance) EPSG:3857 length = 44,733.2 m error +67.832% EPSG:32630 length = 26,643.4 m error -0.038% EPSG:27700 length = 26,644.0 m error -0.036% buffer(0.009) in degrees, measured in BNG: 1.19 km wide x 2.00 km tall, area 1.88 km2 (a true 1 km buffer: 3.14 km2) BNG point scale factor at Manchester Town Hall: 0.999605; Web Mercator: 1.6804 === Step 6: reproject a raster (Copernicus DEM GLO-30, EPSG:4326 -> EPSG:27700) === source: EPSG:4326, 2066 x 1435 px, pixel 1.5" x 1.0" (0.000417 x 0.000278 deg), nodata None on the ground at 53.51 N one pixel is 27.6 m wide x 30.9 m tall target grid: EPSG:27700, 1913 x 1487 px at 30 m, origin E 350,094 N 423,518 nearest minus bilinear: mean +0.007 m, RMS 2.99 m, 99th pct |diff| 4.52 m cubic minus bilinear: mean -0.002 m, RMS 0.80 m, 99th pct |diff| 1.04 m rioxarray: EPSG:27700, shape (1487, 1913), res (30.0, -30.0) same grid as rasterio.warp: True, max |difference| 0.000 m clipped to Greater Manchester: 1,417,745 cells; elevation 7-539 m, mean 123 m highest cell: 539 m at E 405,579 N 401,993 (lon -1.9173, lat 53.5146) === figures === saved: 01-greater-manchester-three-crs.png, 02-transformation-accuracy.png, 03-area-distance-errors.png, 04-dem-reprojected.png, 05-resampling.png