<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=iso-8859-1">
<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;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
font-size:10.0pt;
font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri",sans-serif;}
span.pl-s
{mso-style-name:pl-s;}
span.EmailStyle25
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:185680249;
mso-list-template-ids:162536870;}
@list l0:level1
{mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level2
{mso-level-tab-stop:72.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level3
{mso-level-tab-stop:108.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level4
{mso-level-tab-stop:144.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level5
{mso-level-tab-stop:180.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level6
{mso-level-tab-stop:216.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level7
{mso-level-tab-stop:252.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level8
{mso-level-tab-stop:288.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l0:level9
{mso-level-tab-stop:324.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1
{mso-list-id:911620377;
mso-list-template-ids:2057590962;}
@list l1:level1
{mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level2
{mso-level-tab-stop:72.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level3
{mso-level-tab-stop:108.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level4
{mso-level-tab-stop:144.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level5
{mso-level-tab-stop:180.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level6
{mso-level-tab-stop:216.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level7
{mso-level-tab-stop:252.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level8
{mso-level-tab-stop:288.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l1:level9
{mso-level-tab-stop:324.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l2
{mso-list-id:1580141136;
mso-list-template-ids:-1814548526;}
@list l2:level1
{mso-level-tab-stop:36.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l2:level2
{mso-level-tab-stop:72.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l2:level3
{mso-level-tab-stop:108.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l2:level4
{mso-level-tab-stop:144.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l2:level5
{mso-level-tab-stop:180.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l2:level6
{mso-level-tab-stop:216.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l2:level7
{mso-level-tab-stop:252.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l2:level8
{mso-level-tab-stop:288.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
@list l2:level9
{mso-level-tab-stop:324.0pt;
mso-level-number-position:left;
text-indent:-18.0pt;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></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="NL" link="#0563C1" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Hi Even,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Thanks again for your quick reply, but I think you misunderstood the problem I tried to describe in my last email. I’ll try to explain our problem a bit more comprehensive:
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">We distribute two grid files for the quasi-geoid of the Netherlands: NLGEO2018 and NAPTRANS2018. Both expect ETRS89 (EPSG:4937) ellipsoidal height as input and give the same NAP national
levelling system height (EPSG:5709) as output. However, the latlon coordinates of NLGEO2018 are in ETRS89 and the latlon coordinates of NAPTRANS2018 are in the national triangulation system “Amersfoort” (EPSG:4289). We prefer the use of the NLGEO2018. We supply
NAPTRANS2018 only because this is the type of VDatum grid file that was needed for 3D transformation with PROJ4 (see [1] in my previous email).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Creating a Geodetic TIFF Grid file for NLGEO2018 is straight-forward [A]. However, I can’t create a Geodetic TIFF Grid file for NAPTRANS2018. If I use
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:EN-US">GEOGRAPHIC_TO_VERTICAL</span><span lang="EN-GB" style="mso-fareast-language:EN-US"> the
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:EN-US">--interpolation-crs</span><span lang="EN-GB" style="mso-fareast-language:EN-US"> is ignored [B]. If I use
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:EN-US">VERTICAL_TO_VERTICAL</span><span lang="EN-GB" style="mso-fareast-language:EN-US">, I get
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:EN-US">AssertionError</span><span lang="EN-GB" style="mso-fareast-language:EN-US"> due to the use of a 3D instead of a vertical
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:EN-US">--source-crs</span><span lang="EN-GB" style="font-size:10.0pt;mso-fareast-language:EN-US">
</span><span lang="EN-GB" style="mso-fareast-language:EN-US">[C]. This confuses me, since our use case would probably not be the only VDatum grid with this problem.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">[A] Creating a Geodetic TIFF Grid file for NLGEO2018 is straight-forward:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:EN-US">python vertoffset_grid_to_gtiff.py --type GEOGRAPHIC_TO_VERTICAL --area-of-use "European Netherlands including EEZ of
the North Sea" --source-crs EPSG:4937 --target-crs EPSG:5709 --copyright "Nederlandse Samenwerking Geodetische Infrastructuur (NSGI). Creative Commons Attribution 4.0 International licence https://creativecommons/licenses/by/4.0/" nlgeo2018.gtx nlgeo2018.tif<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US">Result: OK<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">[B] Creating a Geodetic TIFF Grid file for NAPTRANS2018 as I expected it to be done:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:EN-US">python vertoffset_grid_to_gtiff.py
<span style="color:red">--type GEOGRAPHIC_TO_VERTICAL </span>--area-of-use "European Netherlands including EEZ of the North Sea" --source-crs EPSG:4937 --target-crs EPSG:5709
<span style="color:red">--interpolation-crs EPSG:4289</span> --copyright "Nederlandse Samenwerking Geodetische Infrastructuur (NSGI). Creative Commons Attribution 4.0 International licence https://creativecommons/licenses/by/4.0/" naptrans2018.gtx naptrans2018.tif<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US">Result: interpolation-crs ignored<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">[C] NAPTRANS2018 using VERTICAL_TO_VERTICAL instead<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:EN-US">python vertoffset_grid_to_gtiff.py
<span style="color:red">--type VERTICAL_TO_VERTICAL </span>--area-of-use "European Netherlands including EEZ of the North Sea" --source-crs EPSG:4937 --target-crs EPSG:5709
<span style="color:red">--interpolation-crs EPSG:4289 </span>--copyright "Nederlandse Samenwerking Geodetische Infrastructuur (NSGI). Creative Commons Attribution 4.0 International licence https://creativecommons/licenses/by/4.0/" naptrans2018.gtx naptrans2018.tif<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="mso-fareast-language:EN-US">Result: AssertionError due to 3D instead of vertical source-crs<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Regards, Jochem<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Even Rouault <even.rouault@spatialys.com>
<br>
<b>Sent:</b> dinsdag 25 januari 2022 15:58<br>
<b>To:</b> Lesparre, Jochem <Jochem.Lesparre@kadaster.nl>; PROJ@lists.osgeo.org<br>
<b>Subject:</b> Re: [PROJ] Correcting metadata in GeoTIFF files<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p><span lang="EN-GB"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB">Le 25/01/2022 à 15:43, Lesparre, Jochem a écrit :<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-GB">Thanks.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I encountered a new problem:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">We use a horizontal grid as well as a vertical grid for the transformation from ETRS89 (EPSG:4937) to our national CRS: RD (EPSG:28992) with NAP height (EPSG:5709). With PROJ4-style strings [1],</span><span lang="EN-GB" style="mso-fareast-language:EN-US">
an interpolation CRS (EPSG:4289) is needed for the Geodetic TIFF grid of the geoid,
</span><span lang="EN-GB">n</span><span lang="EN-GB" style="mso-fareast-language:EN-US">ext to the source
</span><span lang="EN-GB">(EPSG:4937) </span><span lang="EN-GB" style="mso-fareast-language:EN-US">and target
</span><span lang="EN-GB">(EPSG:5709) </span><span lang="EN-GB" style="mso-fareast-language:EN-US">CRS. To specify this, I have to use
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:EN-US">--type VERTICAL_TO_VERTICAL</span><span lang="EN-GB" style="mso-fareast-language:EN-US"> in the Python script for the conversion from the VDatum grid. This results
in the description “vertical offset” instead of “geoid undulation”. This is a bit strange, as the grid is in fact a geoid. Problematic is that (according to the documentation [2]) the source and target CRS both must be a vertical CRS, while one is our national
levelling height system NAP, but the other is ellipsoidal ETRS89 height. </span>
<span lang="EN-GB"><o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span lang="EN-GB">You should use --type <span class="pl-s">
GEOGRAPHIC_TO_VERTICAL if it is a geoid file (the name is perhaps a bit misleading as the values are to go from vertical CRS to geographic CRS but this is the EPSG naming convention for the transformation)</span><br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">The latter doesn’t have a vertical EPSG code. What is the WKT string of ETRS89 ellipsoidal height?
</span><span lang="EN-GB"><o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span lang="EN-GB">You should use EPSG:4937 for ETRS89 geographic 3D<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"> </span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Next to this, I have some new questions on the use of WKT strings instead of EPSG codes for the</span><span lang="EN-GB" style="mso-fareast-language:EN-US"> specification of a CRS in a Geodetic TIFF
</span><span lang="EN-GB">grid file: <o:p></o:p></span></p>
<p class="MsoListParagraph" style="margin-left:53.4pt;text-indent:-18.0pt;mso-list:l2 level1 lfo1">
<![if !supportLists]><span lang="EN-GB"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-GB">Are the simpler EPSG codes preferred over WKT strings?<o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal">Yes<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoListParagraph" style="margin-left:53.4pt;text-indent:-18.0pt;mso-list:l2 level1 lfo1">
<![if !supportLists]><span lang="EN-GB"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-GB">Is it OK to use a WKT string for the source and a EPSG code for the target,<o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal">Yes<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoListParagraph" style="margin-left:53.4pt;text-indent:-18.0pt;mso-list:l2 level1 lfo1">
<![if !supportLists]><span lang="EN-GB"><span style="mso-list:Ignore">3.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-GB">Can I use the WKT string given by EPSG.org for a CRS with an EPSG code and edit the CRS name in this WKT string to use an alias instead of the official EPSG name (see example [3])?
<o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span lang="EN-GB">You likely need to remove the </span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas">ID["EPSG",4289] node. And it is a bit weird to still use Amesfoort as the datum, since, as far as I understand, if
2 geographic 2D CRS that have same axis, units, datum and prime meridian, they should be the same... That said that will have little consequences since PROJ ignores that anyway.<br>
<br>
</span><span lang="EN-GB"><o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoListParagraph" style="margin-left:53.4pt;text-indent:-18.0pt;mso-list:l2 level1 lfo1">
<![if !supportLists]><span lang="EN-GB"><span style="mso-list:Ignore">4.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Regards, Jochem<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"> </span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"> </span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"> </span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">[1] PROJ4-style transformation from ETRS89 (EPSG:4937) to national horizontal and vertical CRS of the Netherlands:
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas">cs2cs +init=epsg:4937 +to +proj=sterea +lat_0=52.156160556 +lon_0=5.387638889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +nadgrids=rdtrans2018.gsb
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:EN-US">+units=m
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas">+geoidgrids=naptrans2018.gtx
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas;mso-fareast-language:EN-US">+vunits=m</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> +no_defs
</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"> </span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">[2] </span>
<a href="https://github.com/OSGeo/PROJ-data/blob/master/grid_tools/README.md"><span lang="EN-GB" style="mso-fareast-language:EN-US">https://github.com/OSGeo/PROJ-data/blob/master/grid_tools/README.md</span></a><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"> </span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">[</span><span lang="EN-GB">3] WKT string of EPSG:4289 where I replaced the official EPSG name “Amersfoort” to the official Dutch name “RD Bessel”:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:10.0pt;font-family:Consolas">GEOGCRS["<u><span style="color:red">RD Bessel</span></u>",</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:10.0pt;font-family:Consolas"> DATUM["Amersfoort",</span><o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-size:10.0pt;font-family:Consolas">
</span><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas">ELLIPSOID["Bessel 1841",6377397.155,299.1528128,</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> LENGTHUNIT["metre",1,</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> ID["EPSG",9001]</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> ],</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> ID["EPSG",7004]</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> ],</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> ID["EPSG",6289]],</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> CS[ellipsoidal,2,</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> ID["EPSG",6422]</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> ],</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> AXIS["latitude (Lat)",north],</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> AXIS["longitude (Lon)",east],</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> ANGLEUNIT["degree",0.0174532925199433,</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> ID["EPSG",9102]</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> ],</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas"> ID["EPSG",4289]</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB" style="font-size:10.0pt;font-family:Consolas">]</span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"> </span><span lang="EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"> </span><span lang="EN-GB"><o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Even Rouault
</span><a href="mailto:even.rouault@spatialys.com"><span lang="EN-US"><even.rouault@spatialys.com></span></a><span lang="EN-US">
<br>
<b>Sent:</b> maandag 24 januari 2022 21:17<br>
<b>To:</b> Lesparre, Jochem </span><a href="mailto:Jochem.Lesparre@kadaster.nl"><span lang="EN-US"><Jochem.Lesparre@kadaster.nl></span></a><span lang="EN-US">;
</span><a href="mailto:PROJ@lists.osgeo.org"><span lang="EN-US">PROJ@lists.osgeo.org</span></a><span lang="EN-US"><br>
<b>Subject:</b> Re: [PROJ] Correcting metadata in GeoTIFF files</span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
<p><span lang="EN-GB">Jochem,<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB">Le 24/01/2022 à 20:09, Lesparre, Jochem via PROJ a écrit :<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoPlainText"><span lang="EN-GB">Dear list,<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-GB"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-GB">I'm from Netherlands Partnership Geodetic Infrastructure (NSGI). We published NTv2 (.gsb) and VDatum (.gtx) grid files for the national CRS of the Netherlands (RD coordinates with NAP height) in 2019. PROJ converted
these to GeoTIFF (.tif) in 2020 [1]. Unfortunately, some wrong information was stored in the metadata of the GeoTIFF files in the conversion. We are now creating new GeoTIFF files with corrected metadata, using the Python scrips ntv2_to_gtiff.py [2] and vertoffset_grid_to_gtiff.py
[3]. <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-GB"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-GB">For most changes in the metadata this is straightforward, but there is one more difficult issue:<o:p></o:p></span></p>
<p class="MsoPlainText" style="margin-left:35.4pt"><span lang="EN-GB">We have two variants of the horizontal transformation:
<o:p></o:p></span></p>
<p class="MsoPlainText" style="margin-left:71.4pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2">
<![if !supportLists]><span lang="EN-GB"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-GB">Conventional 1-step transformation (variant 2): geographic coordinates of national CRS ---[nl_nsgi_rdtrans2018.tif]---> ETRS89
<o:p></o:p></span></p>
<p class="MsoPlainText" style="margin-left:71.4pt;text-indent:-18.0pt;mso-list:l0 level1 lfo2">
<![if !supportLists]><span lang="EN-GB"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span lang="EN-GB">Better 2-step transformation (variant 1): geographic coordinates of national CRS ---[nl_nsgi_rdcorr2018.tif]---> corrected geographic coordinates of national CRS ---[7_parameter_transformation]---> ETRS89<o:p></o:p></span></p>
<p class="MsoPlainText" style="margin-left:35.4pt"><span lang="EN-GB">Since there is no separate EPSG code for the corrected geographic coordinates of the national CRS, we want to use the same EPSG code for both corrected and uncorrected coordinates. Or will
it give problems when the source and target CRS of a GeoTIFF file are the same?<o:p></o:p></span></p>
</blockquote>
<p><span lang="EN-GB">Instead of the target_crs_code metadata item, you could include a target_crw_wkt with a WKT2 string. That can be done through the ntv2_to_gtiff.py script as it can accept a WKT2 CRS string as the value for --target-crs.<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoPlainText"><span lang="EN-GB"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-GB">Next to this, I have some other questions:<o:p></o:p></span></p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="MsoPlainText" style="mso-list:l1 level1 lfo3"><span lang="EN-GB">Shouldn't a GeoTIFF grid file for a vertical transformation have an accuracy band like a grid for a horizontal transformation? Is it possible with the Python script to create an accuracy
band in the GeoTIFF from a VDatum grid file?<o:p></o:p></span></li></ol>
</blockquote>
<p><span lang="EN-GB">You could possibly add with GDAL standard tools (gdal_translate, etc) a band with the accuracy and a description of "geoid_undulation_accuracy" (you may need to go through a VRT to manually add the Units to the band). The validate_vertical_offset_geographic_to_vertical()
method of the check_gtiff_grid.py script would likely have to be updated so that it doesn't emit an information message about the new band not being recognized. And the spec at
</span><a href="https://secure-web.cisco.com/1IPsQrcS7XiA25_SIbwFzb-QZAKsmLdiZCviwwLfntX_LP5RL4MhT86HqkIDLHoWnxjGPsOj9qatKSQRQ6s-3OgTu2NWmUxO08eXFQDCyBNoiM6PgcO9f94P0uPY5Tod4uKHZ2DYmeBgeH9t6R_uf9AxSLI6uZ7h4ReNQ8fupVoj7z9uP0to6Nlr1Kti7lJycLJvZgYL1hGJywSBwFWky-TKX6tQWP90b26Q0Iub853RFhi4Meej8qTYaHcMfPtczIIxD62IAkCtQyIv3XMdTneUYyFMRszve23cNIudpKQzeuZzt3yS_yl6bQIPnPMO6/https%3A%2F%2Fproj.org%2Fspecifications%2Fgeodetictiffgrids.html"><span lang="EN-GB">https://proj.org/specifications/geodetictiffgrids.html</span></a><span lang="EN-GB">
as well<o:p></o:p></span></p>
<p><span lang="EN-GB"> <o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<ol style="margin-top:0cm" start="2" type="1">
<li class="MsoPlainText" style="mso-list:l1 level1 lfo3"><span lang="EN-GB">Can I add a recommended_interpolation_method with the Python scripts?<o:p></o:p></span></li></ol>
</blockquote>
<p class="MsoNormal"><span lang="EN-GB">Not currently. Either enhance them or add the metadata item manually through GDAL tools (gdal_translate -mo recommended_interpolation_method=foo in.tif out.tif -co COMPRESS=DEFLATE -co INTERLEAVE=BAND -co PREDICTOR=3).
Note that PROJ itself will ignore that item and always apply bilinear interpolation.<br>
<br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<ol style="margin-top:0cm" start="3" type="1">
<li class="MsoPlainText" style="mso-list:l1 level1 lfo3"><span lang="EN-GB">How should I supply the corrected GeoTIFF files to PROJ?<o:p></o:p></span></li></ol>
</blockquote>
<p class="MsoNormal"><span lang="EN-GB">Pull request against </span><a href="https://github.com/OSGeo/PROJ-data/tree/master/nl_nsgi"><span lang="EN-GB">https://github.com/OSGeo/PROJ-data</span></a>
<span lang="EN-GB"><o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
<ol style="margin-top:0cm" start="4" type="1">
<li class="MsoPlainText" style="mso-list:l1 level1 lfo3"><span lang="EN-GB">Is it necessary for PROJ to use new files names to distinguish them from the old version with incorrect metadata?<o:p></o:p></span></li></ol>
</blockquote>
<p class="MsoNormal">No<br>
<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<ol style="margin-top:0cm" start="5" type="1">
<li class="MsoPlainText" style="mso-list:l1 level1 lfo3"> <o:p></o:p></li></ol>
<p class="MsoPlainText"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-GB">Regards, Jochem </span><o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-GB"> </span><o:p></o:p></p>
<p class="MsoPlainText">[1] <a href="https://github.com/OSGeo/PROJ-data/tree/master/nl_nsgi">
https://github.com/OSGeo/PROJ-data/tree/master/nl_nsgi</a> <o:p></o:p></p>
<p class="MsoPlainText">[2] <a href="https://github.com/OSGeo/PROJ-data/blob/master/grid_tools/ntv2_to_gtiff.py">
https://github.com/OSGeo/PROJ-data/blob/master/grid_tools/ntv2_to_gtiff.py</a><o:p></o:p></p>
<p class="MsoPlainText">[3] <a href="https://github.com/OSGeo/PROJ-data/blob/master/grid_tools/vertoffset_grid_to_gtiff.py">
https://github.com/OSGeo/PROJ-data/blob/master/grid_tools/vertoffset_grid_to_gtiff.py</a><o:p></o:p></p>
<p class="MsoPlainText"><b> </b><o:p></o:p></p>
<p class="MsoPlainText"> <o:p></o:p></p>
<p class="MsoPlainText"><span lang="EN-GB">J. Lesparre<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-GB">Netherlands Partnership Geodetic Infrastructure (NSGI.nl)<o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-GB"> <o:p></o:p></span></p>
<p class="MsoPlainText"><span lang="EN-GB"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><br>
<br>
</span><span style="font-size:10.0pt">Disclaimer:<br>
De inhoud van deze e-mail is vertrouwelijk en uitsluitend bestemd voor de geadresseerde(n).<br>
Gebruik, openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan.<br>
Op al onze producten en diensten zijn onze algemene leveringsvoorwaarden van toepassing<br>
[</span><a href="https://www.kadaster.nl/algemene-leveringsvoorwaarden"><span style="font-size:10.0pt">https://www.kadaster.nl/algemene-leveringsvoorwaarden</span></a><span style="font-size:10.0pt">].<br>
<br>
</span><span lang="EN-GB" style="font-size:10.0pt">Disclaimer:<br>
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.<br>
If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.<br>
Our general terms and conditions of delivery apply to all our products and services<br>
[</span><a href="https://secure-web.cisco.com/1fU8sg4FrMFO4TyIW9ZofFSwdqxB0Kag8iZvKOseM_86a_Jx5Z2YV1Hrtt_e8mtlHLMQ0H8zu1i3lanHmsFjggZd1QXIC7i_zohRumwvppYst-xwoiyIzVpRIaUe7MImO2MSCS5aoznYYHb6E-LdzL2tarUM3ByI1fBzPf6EX-yQBpfd_vLLLUaYH2he7-jy3HzpLC2iu2ee6zOAfHGtKhEMeppr62m_f186VKNfXWlLwAxhGXGppzPfI_g4RpQ9OMJiT8koLCKdzzpwTMdFYDY2DaE08KWCvO9WNaB0ciQrOfxgdxfjiQ802OXi4mhKe/https%3A%2F%2Fwww.kadaster.com%2Fgeneral-terms-and-conditions"><span lang="EN-GB" style="font-size:10.0pt">https://www.kadaster.com/general-terms-and-conditions</span></a><span lang="EN-GB" style="font-size:10.0pt">].
<br>
</span><span lang="EN-GB"><br>
<br>
<br>
<o:p></o:p></span></p>
<pre><span lang="EN-GB">_______________________________________________<o:p></o:p></span></pre>
<pre><span lang="EN-GB">PROJ mailing list<o:p></o:p></span></pre>
<pre><a href="mailto:PROJ@lists.osgeo.org"><span lang="EN-GB">PROJ@lists.osgeo.org</span></a><span lang="EN-GB"><o:p></o:p></span></pre>
<pre><a href="https://lists.osgeo.org/mailman/listinfo/proj"><span lang="EN-GB">https://lists.osgeo.org/mailman/listinfo/proj</span></a><span lang="EN-GB"><o:p></o:p></span></pre>
</blockquote>
<pre><span lang="EN-GB">-- <o:p></o:p></span></pre>
<pre><a href="http://secure-web.cisco.com/1fXZS9zkl1X2JBd5DEK4YAq1gPWoDfSCpDSaFlOf5HpAUYrV7SIEw12ok2xJ1dLlvazjXyElbKEjEJLnTBo5NsMUQgMzUh1-_47mgVQpSA2Wih89heEKMsI5iXG5QbxXLAERdl1W-2up80jCvknOD8vY83_Wh-5g43WZIwWQNwaJ38eTscgBCOajh8Bgq8Xmw06STQekuuToXJWmYwQ6woQiNYlE3tHnjcvuhJOGF6aedm4xTRlC4hjYeQ9b8T3HPmwawXXFsXFnlPiuOSR06jIeZ0FCvBXtbexj0ZloQCmzM8W3sBGc11dNGXri3ia7w/http%3A%2F%2Fwww.spatialys.com"><span lang="EN-GB">http://www.spatialys.com</span></a><span lang="EN-GB"><o:p></o:p></span></pre>
<pre><span lang="EN-GB">My software is free, but my time generally not.<o:p></o:p></span></pre>
<p class="MsoNormal"><span lang="EN-GB"><br>
<br>
</span><span style="font-size:10.0pt">Disclaimer:<br>
De inhoud van deze e-mail is vertrouwelijk en uitsluitend bestemd voor de geadresseerde(n).<br>
Gebruik, openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan.<br>
Op al onze producten en diensten zijn onze algemene leveringsvoorwaarden van toepassing<br>
[</span><a href="https://www.kadaster.nl/algemene-leveringsvoorwaarden"><span style="font-size:10.0pt">https://www.kadaster.nl/algemene-leveringsvoorwaarden</span></a><span style="font-size:10.0pt">].<br>
<br>
</span><span lang="EN-GB" style="font-size:10.0pt">Disclaimer:<br>
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.<br>
If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.<br>
Our general terms and conditions of delivery apply to all our products and services<br>
[</span><a href="https://secure-web.cisco.com/1Rhnb2SuM-ZisQ5-ehSorBEaEAymp3uWVHsbgnlOs1Pg5MgVrsPjC7O8qTjD4zT80_6Xn1RawtVUWqlKkCdVIMiapAnSV6eAnPZUsK2JJhMZsWvP4SEVK9tdjcphLVMKBb8TXeu7NFSS6QXoxNn9xjRjduRUV1SOtN0x7PgayMSReCgEDVClEN8TQJxMvxRfFhCldHWr6FP2eavQotePbR4Ywg-kQn1stVzboPN0PeuHNKOVfJWhmqp4AIe58aZyLwgTXIENtf7myj6SP_fzPT0RKDzdxx5Bn7Qnh0FcCeUhlH8n2FTZNj6O-eHXprtRCq8RPUiUODDiRzvSnHATXvrDLhbXeryc5xMaVfHnlhsA/https%3A%2F%2Fwww.kadaster.com%2Fgeneral-terms-and-conditions"><span lang="EN-GB" style="font-size:10.0pt">https://www.kadaster.com/general-terms-and-conditions</span></a><span lang="EN-GB" style="font-size:10.0pt">].
</span><span lang="EN-GB"><o:p></o:p></span></p>
</blockquote>
<pre><span lang="EN-GB">-- <o:p></o:p></span></pre>
<pre><a href="http://secure-web.cisco.com/1LU8njMfYmMFaFPapILcBM73tvtUOgBd-EEc7zqR2Vk9u3neho5DJev426ic0f46uR_eq5VF0Bqp-RFLefFqoLhaF2inDhGAZgnd5N6ho4piq66Ib4z9Ofr5VTjgAv2QzcdUtWHHHgmkCtRTNBrW46MafOphoV-gY7zxxMHnmefFFNYAHWH2dTmXr73fCLBLmrXOKOzWA8RNSBPR33Lyktcr0Fh3qpSVbr_HPcjjd4QDQWHP__uoaASTHBzE3OXCuYDzm5BeqrVuM3T9qe_P1bBy78Apc6PItZR4oQfxICykNd2aay1UZnhTBVWzaWp6AD3K8lx-f7LYv50X_XY8Oz8hPfe-0Rt2IObmC5axZy3Y/http%3A%2F%2Fwww.spatialys.com"><span lang="EN-GB">http://www.spatialys.com</span></a><span lang="EN-GB"><o:p></o:p></span></pre>
<pre><span lang="EN-GB">My software is free, but my time generally not.<o:p></o:p></span></pre>
</div>
<br>
<br>
<font size="2">Disclaimer:<br>
De inhoud van deze e-mail is vertrouwelijk en uitsluitend bestemd voor de geadresseerde(n).<br>
Gebruik, openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking van deze informatie aan derden is niet toegestaan.<br>
Op al onze producten en diensten zijn onze algemene leveringsvoorwaarden van toepassing<br>
[https://www.kadaster.nl/algemene-leveringsvoorwaarden].<br>
<br>
Disclaimer:<br>
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.<br>
If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.<br>
Our general terms and conditions of delivery apply to all our products and services<br>
[https://www.kadaster.com/general-terms-and-conditions]. <br>
</font>
</body>
</html>