<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Yes, the practice for a resource file is:</p>
    <p>- put it under data/</p>
    <p>- add it to the GDAL_DATA_FILES variable on top level gdal.cmake
      file</p>
    <p>- use CPLFindFile("gdal", "your.file") to get its path<br>
    </p>
    <div class="moz-cite-prefix">Le 07/01/2024 à 01:59, Sean Gillies via
      gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOodmJra_6e6mQ6MZbUc-5V=Sa6KLX99SyeXk1fr=Q7VuetdkA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto">
        <div>Happy New Year to you too, Abel.</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Other drivers, such as PCI and NITF,  include
          some files in the data directory.  See  <a
            href="https://github.com/OSGeo/gdal/tree/master/data"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/OSGeo/gdal/tree/master/data</a>.
          Distributions generally copy these to $prefix/share/gdal on
          unix-like systems. I'm not aware of a practice of copying data
          out of a driver's directory to that same location, though it's
          probably possible with Cmake. Your driver's own directory
          won't necessarily exist on a system where you install GDAL.</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">For datum files, have you checked whether they
          already exist in the PROJ project?<br>
          <br>
          <div class="gmail_quote" dir="auto">
            <div dir="ltr" class="gmail_attr">On Sat, Jan 6, 2024,
              2:32 PM Abel Pau via gdal-dev <<a
                href="mailto:gdal-dev@lists.osgeo.org"
                moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div link="#0563C1" vlink="#954F72" lang="CA">
                <div class="m_4816429431418685413WordSection1">
                  <p class="MsoNormal"><span lang="EN-US">Hi,</span></p>
                  <p class="MsoNormal"><span lang="EN-US">Happy New 2024
                      to everyone who celebrates it!</span></p>
                  <p class="MsoNormal"><span lang="EN-US"> </span></p>
                  <p class="MsoNormal"><span lang="EN-US">I am
                      programming a driver and in some point I need to
                      read a file that contains some information (and
                      it’s better to keep this in a file than in c code)
                      about the Horizontal Reference System.</span></p>
                  <p class="MsoNormal"><span lang="EN-US">I have this
                      file here: “GDAL\ogr\ogrsf_frmts\miramon”, but
                      when coding I don’t know how to get to this
                      folder.</span></p>
                  <p class="MsoNormal"><span lang="EN-US"> </span></p>
                  <p class="MsoNormal"><span lang="EN-US">There is any
                      method to open a file (using
                    </span><span
style="font-size:9.5pt;font-family:Consolas;color:black">VSIFOpenL()</span><span
                      lang="EN-US">, for instance) in THIS specific
                      directory? Can I use
                      “GDAL\ogr\ogrsd_frmts\miramon” like that?<br>
                      <br>
                      If not, where can I put this file to be found when
                      executing the code? And how to write this path in
                      the code?<br>
                      <br>
                      Thanks in advance!!</span></p>
                  <p class="MsoNormal"><span lang="EN-US"> </span></p>
                  <p class="MsoNormal"><span lang="EN-US"> </span></p>
                  <p class="MsoNormal"><span lang="EN-US"> </span><span></span></p>
                  <table style="width:375.0pt" width="0" cellspacing="0"
                    cellpadding="0" border="0">
                    <tbody>
                      <tr>
                        <td
                          style="width:232.5pt;padding:0cm 0cm 0cm 0cm"
                          width="310">
                          <p class="MsoNormal"><b><span
style="font-size:11.5pt;font-family:"Arial",sans-serif;color:#003300">Abel
                                Pau Garcia</span></b><span
                              style="font-size:12.0pt">
                            </span><span></span></p>
                          <p class="MsoNormal"><b><span
style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#669900">GIS
                                developer</span></b><span></span></p>
                        </td>
                        <td
                          style="width:142.5pt;padding:0cm 0cm 0cm 0cm"
                          width="190" valign="top">
                          <p class="MsoNormal" style="text-align:right"
                            align="right"><span style="font-size:12.0pt"><img
                                style="width:1.3958in;height:.5208in"
                                id="m_4816429431418685413Imagen_x0020_8"
                                src="cid:image001.png@01DA40EF.E2AE3500"
alt="https://www.creaf.cat/sites/default/files/creaf-signature.png"
                                moz-do-not-send="true" width="134"
                                height="50"></span><span></span></p>
                        </td>
                      </tr>
                      <tr>
                        <td style="padding:0cm 0cm 0cm 0cm">
                          <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#003300"><a
                                href="mailto:a.pau@creaf.uab.cat"
                                target="_blank" rel="noreferrer"
                                moz-do-not-send="true"><b><span
                                    style="color:blue">a.pau@creaf.uab.cat</span></b></a></span><span></span></p>
                          <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#003300"><a
href="https://teams.microsoft.com/l/chat/0/0?users=a.pau@creaf.uab.cat"
                                target="_blank" rel="noreferrer"
                                moz-do-not-send="true"><b><span
                                    style="color:blue">Let's chat on
                                    Teams!</span></b></a></span><span></span></p>
                          <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#003300">Tel.
                                +34 934814277</span></b><span></span></p>
                        </td>
                        <td
                          style="width:106.5pt;padding:0cm 0cm 0cm 0cm"
                          width="190" valign="top">
                          <p class="MsoNormal" style="text-align:right"
                            align="right"><span style="font-size:12.0pt"><img
                                style="width:1.0937in;height:.5208in"
                                id="m_4816429431418685413Imagen_x0020_7"
                                src="cid:image002.png@01DA40EF.E2AE3500"
alt="https://www.creaf.cat/sites/default/files/so-en-signature.png"
                                moz-do-not-send="true" width="105"
                                height="50" border="0"></span><span></span></p>
                        </td>
                      </tr>
                      <tr>
                        <td style="padding:0cm 0cm 0cm 0cm">
                          <p class="MsoNormal"><span lang="ES"><a
href="https://twitter.com/CREAF_ecologia" target="_blank"
                                rel="noreferrer" moz-do-not-send="true"><span
style="font-size:12.0pt;color:#0563c1;text-decoration:none" lang="CA"><img
                                    style="width:.177in;height:.177in"
id="m_4816429431418685413Imagen_x0020_6"
src="cid:image003.png@01DA40EF.E2AE3500"
alt="https://www.creaf.cat/sites/default/files/twitter-icon-signature.png"
                                    moz-do-not-send="true" width="17"
                                    height="17" border="0"></span></a><a
href="https://www.linkedin.com/company/1363052?trk=tyah&trkInfo=clickedVertical:company,clickedEntityId:1363052,idx:2-1-2,tarId:1465807877789,tas:creaf"
                                target="_blank" rel="noreferrer"
                                moz-do-not-send="true"><span
style="font-size:12.0pt;color:#0563c1;text-decoration:none" lang="CA"><img
                                    style="width:.177in;height:.177in"
id="m_4816429431418685413Imagen_x0020_5"
src="cid:image004.png@01DA40EF.E2AE3500"
alt="https://www.creaf.cat/sites/default/files/linkedin-icon-signature.png"
                                    moz-do-not-send="true" width="17"
                                    height="17" border="0"></span></a><a
href="https://www.youtube.com/c/creafecologia" target="_blank"
                                rel="noreferrer" moz-do-not-send="true"><span
style="font-size:12.0pt;color:#0563c1;text-decoration:none" lang="CA"><img
                                    style="width:.177in;height:.177in"
id="m_4816429431418685413Imagen_x0020_4"
src="cid:image005.png@01DA40EF.E2AE3500"
alt="https://www.creaf.cat/sites/default/files/youtube-icon-signature.png"
                                    moz-do-not-send="true" width="17"
                                    height="17" border="0"></span></a><a
href="https://www.instagram.com/CREAF_ecologia/" target="_blank"
                                rel="noreferrer" moz-do-not-send="true"><span
style="font-size:12.0pt;color:#0563c1;text-decoration:none" lang="CA"><img
                                    style="width:.177in;height:.177in"
id="m_4816429431418685413Imagen_x0020_3"
src="cid:image006.png@01DA40EF.E2AE3500"
alt="https://www.creaf.cat/sites/default/files/instagram-icon-signature.png"
                                    moz-do-not-send="true" width="17"
                                    height="17" border="0"></span></a></span><span></span></p>
                          <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#003300"><a
                                href="http://www.creaf.cat"
                                target="_blank" rel="noreferrer"
                                moz-do-not-send="true"><b><span
                                    style="color:#003300">www.creaf.cat</span></b></a><b>
                                |
                              </b><a href="http://blog.creaf.cat"
                                target="_blank" rel="noreferrer"
                                moz-do-not-send="true"><b><span
                                    style="color:#003300">http://blog.creaf.cat</span></b></a></span><span></span></p>
                        </td>
                        <td style="padding:0cm 0cm 0cm 0cm" valign="top">
                          <p class="MsoNormal" style="text-align:right"
                            align="right"><span style="font-size:12.0pt"><img
                                style="width:1.0937in;height:.5208in"
                                id="m_4816429431418685413Imagen_x0020_2"
                                src="cid:image007.jpg@01DA40EF.E2AE3500"
alt="https://www.creaf.cat/sites/default/files/uab_logo_signatura.png"
                                moz-do-not-send="true" width="105"
                                height="50" border="0"></span><span></span></p>
                        </td>
                      </tr>
                      <tr>
                        <td colspan="2" style="padding:0cm 0cm 0cm 0cm">
                          <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#003300">CREAF.
                              Campus UAB. Edifici C. 08193 Bellaterra
                              (Barcelona)</span><span></span></p>
                        </td>
                      </tr>
                      <tr>
                        <td colspan="2" style="padding:0cm 0cm 0cm 0cm">
                          <p class="MsoNormal"><span
style="font-size:8.5pt;font-family:"Arial",sans-serif;color:#999999"><br>
                              Before printing this electronic message,
                              think about the environment.</span><span></span></p>
                        </td>
                      </tr>
                      <tr>
                        <td colspan="2" style="padding:0cm 0cm 0cm 0cm">
                          <p class="MsoNormal"><span
                              style="font-size:12.0pt"><img
                                style="width:5.2083in;height:.0625in"
                                id="m_4816429431418685413Imagen_x0020_1"
                                src="cid:image008.jpg@01DA40EF.E2AE3500"
alt="http://www.creaf.uab.cat/_signatura/line.gif"
                                moz-do-not-send="true" width="500"
                                height="6" border="0"></span><span></span></p>
                        </td>
                      </tr>
                    </tbody>
                  </table>
                  <p class="MsoNormal"><span> </span></p>
                  <p class="MsoNormal"><span lang="ES"> </span></p>
                </div>
              </div>
              _______________________________________________<br>
              gdal-dev mailing list<br>
              <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank"
                rel="noreferrer" moz-do-not-send="true"
                class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a><br>
              <a
                href="https://lists.osgeo.org/mailman/listinfo/gdal-dev"
                rel="noreferrer noreferrer" target="_blank"
                moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
            </blockquote>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</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>