<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="DA">Hi list,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DA"><o:p> </o:p></span></p>
<p class="MsoNormal">I am trying to apply a custom vertical transformation to a grid using gdalwarp and am struggling a bit to get the results I want. It’s entirely possible I am trying something not within the capabilities of gdalwarp but I am sure someone
 here can help me figure that out.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am devising a deformation model transformation that is meant to adjust terrain heights over a certain time period. The general idea here is to predict the changes in the terrain in the future based on various information like isostatic
 uplift and land subsidence. I have this information available as gridded ground motion velocities. For now though I am just concerned about making a proof-of-concept transformation and subsequent terrain adjustment using PROJ and GDAL. I’ve got the PROJ part
 figured out but need a bit of help to do what I want with GDAL.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">My transformation is a using the PROJ “defmodel” operation. My proof-of-concept is available in this repository:
<a href="https://github.com/kbevers/dk2100">https://github.com/kbevers/dk2100</a>. For now it’s just a dummy that uses the same deformation grid twice and applies a correction to the input height value. An example looks like this:
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-indent:36.0pt">echo 687071.4391 6210141.3267 0 2025 | cct +proj=pipeline +step +proj=utm +zone=32 +inv +step \<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:36.0pt"><span lang="DA">+proj=defmodel +model=./defmodel.json +step +proj=utm +zone=32<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:36.0pt"><span lang="DA">  687071.4391   6210141.3267        6.0000     2025.0000<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="DA"><o:p> </o:p></span></p>
<p class="MsoNormal">The UTM steps surrounding the defmodel accomodate that the grids I want to transform have horizontal coordinates registered as EPSG:25832. Ideally I want this to be a time-dependent transformation but for now I am just working with simple
 constant offsets. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">When using the above transformation with gdalwarp I am presented with an error:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">gdalwarp -ct "+proj=pipeline +step +proj=utm +zone=32 +inv +step +proj=defmodel +model=./defmodel.json +step +proj=utm +zone=32" \ DHYMSEA_1km_6150_542.tif out.tif<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">ERROR 1: Too many points (2601 out of 2601) failed to transform, unable to compute output bounds.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The immediate question is “what am I missing”? I suppose I either have some errors in the transformation setup or am missing some command line switches. Any guidance is appreciated. The next question is, if I turn the above transformation
 into a time-depending transformation, would I be able to use that with gdalwarp? I see GDAL 3.4 has some switches for applying coordinate epochs but haven’t been able to test them since I don’t have version 3.4 readily available at the moment.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best regards,<o:p></o:p></p>
<p class="MsoNormal">Kristian<o:p></o:p></p>
</div>
</body>
</html>