<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <p>Jochem,<br>
    </p>
    <div class="moz-cite-prefix">Le 24/01/2022 à 20:09, Lesparre, Jochem
      via PROJ a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:AM0P192MB0482A6AD0F1ADD46EEA1312AEF5E9@AM0P192MB0482.EURP192.PROD.OUTLOOK.COM">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}@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;}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;}span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri",sans-serif;}.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}div.WordSection1
        {page:WordSection1;}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]-->
      <div class="WordSection1">
        <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>
        <ul style="margin-top:0cm" type="disc">
          <li class="MsoPlainText" style="margin-left:35.4pt;mso-list:l4
            level1 lfo5"><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></li>
          <li class="MsoPlainText" style="margin-left:35.4pt;mso-list:l4
            level1 lfo5"><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></li>
        </ul>
        <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?</span></p>
      </div>
    </blockquote>
    <p>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.<br>
    </p>
    <blockquote type="cite"
cite="mid:AM0P192MB0482A6AD0F1ADD46EEA1312AEF5E9@AM0P192MB0482.EURP192.PROD.OUTLOOK.COM">
      <div class="WordSection1">
        <p class="MsoPlainText" style="margin-left:35.4pt"><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="MsoPlainText"><span lang="EN-GB">Next to this, I have
            some other questions:<o:p></o:p></span></p>
        <ul style="margin-top:0cm" type="disc">
          <li class="MsoPlainText" style="mso-list:l0 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?</span></li>
        </ul>
      </div>
    </blockquote>
    <p>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
      <a class="moz-txt-link-freetext" href="https://proj.org/specifications/geodetictiffgrids.html">https://proj.org/specifications/geodetictiffgrids.html</a> as well<br>
    </p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:AM0P192MB0482A6AD0F1ADD46EEA1312AEF5E9@AM0P192MB0482.EURP192.PROD.OUTLOOK.COM">
      <div class="WordSection1">
        <ul style="margin-top:0cm" type="disc">
          <li class="MsoPlainText" style="mso-list:l0 level1 lfo3"><span
              lang="EN-GB"><o:p></o:p>Can I add a
              recommended_interpolation_method with the Python scripts?</span></li>
        </ul>
      </div>
    </blockquote>
    Not currently.  Either enhance them or add the metadata item
    manually through GDAL tools (gdal_translate -mo <span lang="EN-GB">recommended_interpolation_method=foo
      in.tif out.tif -co COMPRESS=DEFLATE -co INTERLEAVE=BAND -co
      PREDICTOR=3</span>). Note that PROJ itself will ignore that item
    and always apply bilinear interpolation.<br>
    <blockquote type="cite"
cite="mid:AM0P192MB0482A6AD0F1ADD46EEA1312AEF5E9@AM0P192MB0482.EURP192.PROD.OUTLOOK.COM">
      <div class="WordSection1">
        <ul style="margin-top:0cm" type="disc">
          <li class="MsoPlainText" style="mso-list:l0 level1 lfo3"><span
              lang="EN-GB"><o:p></o:p>How should I supply the corrected
              GeoTIFF files to PROJ?</span></li>
        </ul>
      </div>
    </blockquote>
    Pull request against <span lang="EN-GB"><a
        href="https://github.com/OSGeo/PROJ-data/tree/master/nl_nsgi">https://github.com/OSGeo/PROJ-data</a></span>
    <blockquote type="cite"
cite="mid:AM0P192MB0482A6AD0F1ADD46EEA1312AEF5E9@AM0P192MB0482.EURP192.PROD.OUTLOOK.COM">
      <div class="WordSection1"><br>
        <ul style="margin-top:0cm" type="disc">
          <li class="MsoPlainText" style="mso-list:l0 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?</span></li>
        </ul>
      </div>
    </blockquote>
    No<br>
    <blockquote type="cite"
cite="mid:AM0P192MB0482A6AD0F1ADD46EEA1312AEF5E9@AM0P192MB0482.EURP192.PROD.OUTLOOK.COM">
      <div class="WordSection1">
        <ul style="margin-top:0cm" type="disc">
          <li class="MsoPlainText" style="mso-list:l0 level1 lfo3"><span
              lang="EN-GB"><o:p></o:p></span></li>
        </ul>
        <p class="MsoPlainText"><span lang="EN-GB"><o:p> </o:p></span></p>
        <p class="MsoPlainText"><span lang="EN-GB">Regards, Jochem <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">[1] <a
              href="https://github.com/OSGeo/PROJ-data/tree/master/nl_nsgi"
              moz-do-not-send="true">
              https://github.com/OSGeo/PROJ-data/tree/master/nl_nsgi</a>
            <o:p></o:p></span></p>
        <p class="MsoPlainText"><span lang="EN-GB">[2] <a
href="https://github.com/OSGeo/PROJ-data/blob/master/grid_tools/ntv2_to_gtiff.py"
              moz-do-not-send="true">
https://github.com/OSGeo/PROJ-data/blob/master/grid_tools/ntv2_to_gtiff.py</a><o:p></o:p></span></p>
        <p class="MsoPlainText"><span lang="EN-GB">[3] <a
href="https://github.com/OSGeo/PROJ-data/blob/master/grid_tools/vertoffset_grid_to_gtiff.py"
              moz-do-not-send="true">
https://github.com/OSGeo/PROJ-data/blob/master/grid_tools/vertoffset_grid_to_gtiff.py</a><o:p></o:p></span></p>
        <p class="MsoPlainText"><b><span lang="EN-GB"><o:p> </o:p></span></b></p>
        <p class="MsoPlainText"><span lang="EN-GB"><o:p> </o:p></span></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>
      </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>
        [<a class="moz-txt-link-freetext" href="https://www.kadaster.nl/algemene-leveringsvoorwaarden">https://www.kadaster.nl/algemene-leveringsvoorwaarden</a>].<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>
        [<a class="moz-txt-link-freetext" href="https://www.kadaster.com/general-terms-and-conditions">https://www.kadaster.com/general-terms-and-conditions</a>]. <br>
      </font>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
PROJ mailing list
<a class="moz-txt-link-abbreviated" href="mailto:PROJ@lists.osgeo.org">PROJ@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/proj">https://lists.osgeo.org/mailman/listinfo/proj</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>