2

I'm using ArcGIS Pro to reproject my raster from EPSG:27700 (British National Grid) to EPSG:3857 (WGS84)

The Geographic Transformation says OSGB_1936_To_ETRS_1989_1 + ETRS_1989_To_WGS_1984

How do I do such a transformation in GDAL?

I can't seem to figure out the correct EPSG codes for ETRS_1989_1 and ETRS_1989

1 Answer 1

0

The reprojection is done in some steps:

You can do it with gdalwarp and the -ct parameter (PROJ coordinates transformation pipeline). To know the pipelines use projinfo:

$ projinfo -s EPSG:27700 -t EPSG:4277 -o PROJ
Candidate operations found: 1
-------------------------------------
Operation No. 1:

INVERSE(EPSG):19916, Inverse of British National Grid, 0 m, United Kingdom (UK) - offshore to boundary of UKCS within 49°45'N to 61°N and 9°W to 2°E; onshore Great Britain (England, Wales and Scotland). Isle of Man onshore.

PROJ string:
+proj=pipeline
  +step +inv +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000
        +y_0=-100000 +ellps=airy
  +step +proj=unitconvert +xy_in=rad +xy_out=deg
  +step +proj=axisswap +order=2,1
$ projinfo EPSG:5338 -k operation -o PROJ
PROJ string:
+proj=pipeline
  +step +proj=axisswap +order=2,1
  +step +proj=unitconvert +xy_in=deg +xy_out=rad
  +step +proj=hgridshift +grids=OSTN02_NTv2.gsb
  +step +proj=unitconvert +xy_in=rad +xy_out=deg
  +step +proj=axisswap +order=2,1
$ projinfo EPSG:1149 -k operation -o PROJ
PROJ string:
+proj=noop
$ projinfo -s EPSG:4326 -t EPSG:3857 -o PROJ
Candidate operations found: 1
-------------------------------------
Operation No. 1:

EPSG:3856, Popular Visualisation Pseudo-Mercator, 0 m, World.

PROJ string:
+proj=pipeline
  +step +proj=axisswap +order=2,1
  +step +proj=unitconvert +xy_in=deg +xy_out=rad
  +step +proj=webmerc +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84

Maybe some intermediate axis swaps and unit conversions can be omitted, but I would leave them as they are, joining one after the other. The no operation between ETRS89 and WGS84 can be omitted too. All you need is the OSTN02_NTv2.gsb grid file in your PROJ installation.

gdalwarp -s_srs "EPSG:27700" -t_srs "EPSG:3857" -ct "+proj=pipeline +step +inv +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1 +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift +grids=OSTN02_NTv2.gsb +step +proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1 +step +proj=axisswap +order=2,1 +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=webmerc +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84" input.tif output.tif

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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