[PROJ] Assistance with GDALWarp - ESPG:27700 to ESPG:4326 - Elipsod level not sea level
Patrick Young
patrick.mckendree.young at gmail.com
Sun Apr 18 19:30:37 PDT 2021
Hi Raife,
I think what is missing is the explicit vertical datum associated with that
code. I've come across this myself when converting a DTM to ellipsoidal
heights. Here's an example from my bash history that converts the heights
with gdalwarp:
gdalwarp -s_srs "+proj=longlat +datum=WGS84 +no_defs
+geoidgrids=egm96_15.gtx" -t_srs "EPSG:4326" dem-geoid.tif dem-hae.tif
I think the trick is just figuring out the right proj strings/finding the
right EPSG compound code (there's an example at the bottom of this page
https://gdal.org/programs/gdalwarp.html#gdalwarp). I think under the hood
it's using this fellow, so at the end of the day you just have to find the
right grid:
https://gdal.org/api/gdal_alg.html?highlight=applyvert#_CPPv426GDALApplyVerticalShiftGrid12GDALDatasetH12GDALDatasetHiddPPCKc
P
On Sun, Apr 18, 2021 at 9:17 AM Raife Crookes <raife at tp-regen.co.uk> wrote:
> Good evening,
>
>
>
> I am hoping that someone could assist me with the completion of a
> reprojection of a geotiff lidar data set to WGS84.
>
>
>
> The transformation should me making an elevation change of roughly 50m for
> known points however after running GDAL warp the elevations are staying the
> same when viewed through QGIS.
>
>
>
> For some reason it seems to be defaulting to the WGS84 geoid height not
> the ellipsoid height I require for import onto our drone. (My knowledge is
> that EPSG:4326 should equate to the wgs lat/long and ellipsoid height.)
>
>
>
> GDALWARP instructions:
>
> gdalwarp -s_srs EPSG:27700 -t_srs EPSG:4326
>
> gdalwarp -s_srs -t_srs EPSG:4326
>
>
>
>
>
>
>
> Proj info return:
>
> C:\>projinfo -s EPSG:27700 -t EPSG:4326 -o PROJ
>
> Candidate operations found: 1
>
> Note: using '--spatial-test intersects' would bring more results (7)
>
> -------------------------------------
>
> Operation No. 1:
>
>
>
> unknown id, Inverse of British National Grid + OSGB 1936 to WGS 84 (9), 1
> m, UK - Britain and UKCS 49┬░46'N to 61┬░01'N, 7┬░33'W to 3┬░33'E
>
>
>
> 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=hgridshift
> +grids=OSTN15_NTv2_OSGBtoETRS.gsb +step +proj=unitconvert +xy_in=rad
> +xy_out=deg +step +proj=axisswap +order=2,1
>
>
>
>
>
>
>
> I can send copies of the original file if requested.
>
>
>
> Hoping that its something stupid like im using the wrong EPSG code but
> have a terrible feeling that a catch all to prevent users accidentally
> using the ellipsoid height is catching me out.
>
>
>
> (Ground height OSGB – 30m in WGS84 = 82m)
>
>
>
> Really look forward to your help/
>
>
>
> Kind regards
>
>
>
> Raife
>
>
> _______________________________________________
> PROJ mailing list
> PROJ at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/proj
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20210418/32584ee3/attachment.html>
More information about the PROJ
mailing list