[PROJ] Assistance with GDALWarp - ESPG:27700 to ESPG:4326 - Elipsod level not sea level
Nicolas Cadieux
njacadieux.gitlab at gmail.com
Mon Apr 19 15:55:13 PDT 2021
Hi,
VDATUM will change the GEIOD anywhere on earth so you start with a
vertical transformation in gdal and then with the horizontal
transformation in VDATUM.
Nicolas
On 2021-04-19 11:04 a.m., Raife Crookes wrote:
>
> Good afternoon Patrick and Nicolas,
>
> Many thanks for your input,
>
> Nicolas unfortunately the VDatum doesn’t yet have transformation for
> UK co-ordinate systems.
>
> Patrick, your code below
>
> “gdalwarp -s_srs "+proj=longlat +datum=WGS84 +no_defs
> +geoidgrids=egm96_15.gtx" -t_srs "EPSG:4326" dem-geoid.tif dem-hae.tif”
>
> Has done the job if I do it in two steps:
>
> 1^st import the EPSG:27700 data set and translate this to EPSG:4326.
>
> 2^nd Run the code you suggested to correct for elevation.
>
> It would be ace to have found a way to do this in one step but frankly
> the two step seems workable.
>
> Kind regards,
>
> Raife
>
> *From:*Patrick Young <patrick.mckendree.young at gmail.com>
> *Sent:* 19 April 2021 03:31
> *To:* Raife Crookes <raife at tp-regen.co.uk>
> *Cc:* proj at lists.osgeo.org
> *Subject:* Re: [PROJ] Assistance with GDALWarp - ESPG:27700 to
> ESPG:4326 - Elipsod level not sea level
>
> 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
> <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
> <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
> <mailto: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 <mailto:PROJ at lists.osgeo.org>
> https://lists.osgeo.org/mailman/listinfo/proj
> <https://lists.osgeo.org/mailman/listinfo/proj>
>
--
Nicolas Cadieux
https://gitlab.com/njacadieux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20210419/383f89af/attachment.html>
More information about the PROJ
mailing list