[gdal-dev] gdalwarp and gdaltransform are inconsistent

Pillio Zoltan zoltanpillio at gmail.com
Sun Apr 19 12:21:12 PDT 2020


Hi,

I'm new here, and just started using gdal, so maybe I'm misunderstanding
something, but I found that gdalwarp and gdaltransform produces different
results.

The gdaltransform command is :
echo 2600000 1196000 768 | gdaltransform -t_srs EPSG:4326 -s_srs EPSG:2056

and the result is:
7.43863317174838 46.9151021335816 817.714334204793

,but if I'm converting a geotif with the following command:
gdalwarp -t_srs EPSG:4326 -s_srs EPSG:2056
SWISSALTI3D_10_TIFF_CHLV95_LN02_2600_1196.tif test.tif

the height doesn't change. I'm using swisstopo example data from here:
https://cms.geo.admin.ch/Topo/swissalti3d/swissalti3dgeotifflv95.zip

I did the conversion by myself based on swisstopo documentation (link
above), and the result of gdaltransform is correct, but gdalwarp is wrong.

Do I misunderstand something, or did I make a mistake?

I'm using GDAL 2.4.2, released 2019/06/28

Thank you in advance for your help.

Best regards,
Zoltan Pillio

ps.:
I also found that setting height reference frame has no effect in these
cases:
echo 2600000 1196000 768 | gdaltransform -t_srs EPSG:4326 -s_srs EPSG:2056
echo 2600000 1196000 768 | gdaltransform -t_srs EPSG:4326 -s_srs
EPSG:2056+5728
echo 2600000 1196000 768 | gdaltransform -t_srs EPSG:4326 -s_srs
EPSG:2056+5729

and the swisstopo documentation for conversion I used:
https://www.swisstopo.admin.ch/content/swisstopo-internet/en/online/calculation-services/_jcr_content/contentPar/tabs/items/documents_publicatio/tabPar/downloadlist/downloadItems/19_1467104393233.download/ch1903wgs84_e.pdf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200419/b76f1a5d/attachment.html>


More information about the gdal-dev mailing list