<div dir="ltr"><div dir="ltr">Hi Even,<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span style="font-family:monospace;font-size:12px;white-space:pre-wrap">To start with, you need the the dataset pointed by RPC_DEM is a compoundCRS with a vertical CRS properly defined</span> </blockquote><div><br></div><div>Thanks, I initially didn't understand why this wasn't working as the SRTM DEM I am using does not have a compoundCRS. I worked around this by creating a VRT with the correct compoundCRS. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <span style="font-family:monospace;font-size:12px;white-space:pre-wrap">Interpolation of the geoid grid is done by PROJ itself, and this is bilinear interpolation</span></blockquote><div><br></div><div>Awesome, good to know. Is there anyway of configuring this?</div><div><br></div><div>Thanks for the quick response.</div><div><br></div><div>Sebastien</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 17, 2020 at 10:09 AM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.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"><u></u>
<div style="font-family:monospace;font-size:9pt;font-weight:400;font-style:normal">
<p style="margin:0px;text-indent:0px">Yann-Sebastien,</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">> I spent a bit of time learning about vertical datum shifts when performing</p>
<p style="margin:0px;text-indent:0px">> RPC coordinate transformations using a DEM this week, and I was curious</p>
<p style="margin:0px;text-indent:0px">> about how the egm96_15.gtx file is interpolated. I was able to find in</p>
<p style="margin:0px;text-indent:0px">> gdal_rpc.cpp that the required vdatum shift is calculated using an OGR</p>
<p style="margin:0px;text-indent:0px">> Coordinate Transformation between the DEM spatial reference and a wgs84</p>
<p style="margin:0px;text-indent:0px">> ellipsoid spatial reference, but I’m not familiar enough with OGR/PROJ to</p>
<p style="margin:0px;text-indent:0px">> understand exactly how the gtx file is sampled.</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">To start with, you need the the dataset pointed by RPC_DEM is a compoundCRS with a vertical CRS properly defined and an existing transformation between that vertical CRS and WGS84, so if it is something like EPSG:XXXX+5773, that will be fine.</p>
<p style="margin:0px;text-indent:0px">Interpolation of the geoid grid is done by PROJ itself, and this is bilinear interpolation.</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">Even</p>
<p style="margin:0px;text-indent:0px"> </p>
<p style="margin:0px;text-indent:0px">-- </p>
<p style="margin:0px;text-indent:0px">Spatialys - Geospatial professional services</p>
<p style="margin:0px;text-indent:0px"><a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a></p></div></blockquote></div></div>