<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 8, 2019 at 11:18 AM Andrew Cunliffe <<a href="mailto:andrewmcunliffe@gmail.com">andrewmcunliffe@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span>Can anyone help with the syntax to calculate HAG (height above ground) relative
to an interpolated surface (following James McClain’s contribution, <a href="https://github.com/PDAL/PDAL/pull/2520" style="color:rgb(5,99,193);text-decoration:underline" target="_blank">#2520</a>)?<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span><span><br></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span>I’ve tried:<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt 80px;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span>{<span></span></span></p><div style="margin-left:80px">
</div><p class="MsoNormal" style="margin:0cm 0cm 8pt 80px;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span><span> </span>"type":
"filters.hag",<span></span></span></p><div style="margin-left:80px">
</div><p class="MsoNormal" style="margin:0cm 0cm 8pt 80px;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span><span> </span>"delaunay": True<span></span></span></p><div style="margin-left:80px">
</div><p class="MsoNormal" style="margin:0cm 0cm 8pt 80px;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span>},<span></span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span><span> </span></span></p>
<p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span>But the output HAG is clearly still being computed
relative to the nearest neighbour, rather than an interpolated surface as desired. I’ve tried <b>"delaunay_fan": True</b>, and also including <b>“count”:
4</b> arguments, and have been looking through GitHub (which led me to “delauney”
rather "delaunay_fan") but still haven’t succeeded.<br></span></p></div></blockquote><div><br></div><div>The option is "delaunay", as you've specified, though the constant 'true' must be specified in lowercase to be valid JSON. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span></span></p><p class="MsoNormal" style="margin:0cm 0cm 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt">What am I missing?</span></p></div></blockquote><div>Looking at the code, it appears that you also need to set "count" to some reasonable value in order to get this interpolation method to work. The code builds a delaunay triangulation of <count> neighbors and then interpolates attempts to use that triangulation to determine a Z value for the point in question. I'd have to look through the math more closely to give you better information. It appears that things haven't been documented. I'll take a stab at that before long.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div></div>