<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">Le 18/01/2024 à 21:16, Abel Pau a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:PAXPR07MB77758AAFEDC1F17C79B40E30A2712@PAXPR07MB7775.eurprd07.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator"
content="Microsoft Word 15 (filtered medium)">
<style>@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;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}pre
{mso-style-priority:99;
mso-style-link:"HTML con formato previo Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-language:CA;}span.HTMLconformatoprevioCar
{mso-style-name:"HTML con formato previo Car";
mso-style-priority:99;
mso-style-link:"HTML con formato previo";
font-family:Consolas;
mso-fareast-language:EN-US;}p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;
mso-fareast-language:CA;}span.EstiloCorreo21
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}span.EstiloCorreo22
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}span.EstiloCorreo23
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}span.EstiloCorreo24
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}div.WordSection1
{page:WordSection1;}</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="MsoNormal"><span style="color:#1F497D" lang="EN-US">After
all that process if I search for the file in all gdal it
appears twice:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">d:\GitHub-repository\gdal\ogr\ogrsf_frmts\miramon\data\MM_m_idofic.csv
<-- OK; where it is...</span></p>
</div>
</blockquote>
Yes, this is the location of the source file, as stored in the git
repository and in release source tarballs.<br>
<blockquote type="cite"
cite="mid:PAXPR07MB77758AAFEDC1F17C79B40E30A2712@PAXPR07MB7775.eurprd07.prod.outlook.com">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">And
here, with all other data files. It is correct?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">d:\GitHub-repository\gdal\build\data\MM_m_idofic.csv</span></p>
</div>
</blockquote>
<p>Yes, build artifact copied from source location by the logic at
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/blob/a090314330026333eba534d50f74499ffee76d63/gdal.cmake#L671">https://github.com/OSGeo/gdal/blob/a090314330026333eba534d50f74499ffee76d63/gdal.cmake#L671</a></p>
<p>As I mentioned yesterday, for development builds, you should
change your GDAL_DATA env var now to point to <span
style="color:#1F497D" lang="EN-US">d:\GitHub-repository\gdal\build\data</span></p>
<p><span style="color:#1F497D" lang="EN-US">Even<br>
</span></p>
<blockquote type="cite"
cite="mid:PAXPR07MB77758AAFEDC1F17C79B40E30A2712@PAXPR07MB7775.eurprd07.prod.outlook.com">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="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
style="mso-fareast-language:CA" lang="ES">De:</span></b><span
style="mso-fareast-language:CA" lang="ES"> gdal-dev
<a class="moz-txt-link-rfc2396E" href="mailto:gdal-dev-bounces@lists.osgeo.org"><gdal-dev-bounces@lists.osgeo.org></a>
<b>En nombre de </b>Abel Pau via gdal-dev<br>
<b>Enviado el:</b> dijous, 18 de gener de 2024 21:13<br>
<b>Para:</b> Even Rouault
<a class="moz-txt-link-rfc2396E" href="mailto:even.rouault@spatialys.com"><even.rouault@spatialys.com></a>;
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<b>Asunto:</b> Re: [gdal-dev] Where to fins my own files<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="ES">Even,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="ES">thanks
a lot.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="ES"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">I
moved the file to {my
GitHubDir}\GDAL\ogr\ogrsf_frmts\miramon\data\MM_m_idofic.csv<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">I
changed my CMakeLists.txt (see it below) as you indicated.
And I deleted from gdal.cmake than now has only 5 files in
there)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">I
rebased, deleted my gdal\build directory created the project
again and built this.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">An
when I debug it seems that
</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">CPLFindFile(</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515;mso-fareast-language:CA">"gdal"</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">,
</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515;mso-fareast-language:CA">"MM_m_idofic.csv"</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">);</span><span
style="color:#1F497D" lang="EN-US"> returns NULL. If I see
inside it has only one locator and it seems that should be
more, now...<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">I
am missing something?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">The
CMakeLists<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">add_gdal_driver(<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">
</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;mso-fareast-language:CA">TARGET</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">
ogr_MiraMon<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">
</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;mso-fareast-language:CA">SOURCES</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">
ogrmiramondatasource.cpp ogrmiramondriver.cpp
ogrmiramonlayer.cpp mm_wrlayr.c mm_gdal_functions.c
mmrdlayr.c<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">
BUILTIN)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">gdal_standard_includes(ogr_MiraMon)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue;mso-fareast-language:CA">target_include_directories</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">(ogr_MiraMon
</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;mso-fareast-language:CA">PRIVATE</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">
$<TARGET_PROPERTY:ogrsf_generic,SOURCE_DIR>)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue;mso-fareast-language:CA">set</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">(GDAL_DATA_FILES<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">
</span><b><span
style="font-size:9.5pt;font-family:Consolas;color:#008800;mso-fareast-language:CA">${CMAKE_CURRENT_SOURCE_DIR}</span></b><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">/data/MM_m_idofic.csv<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">)<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:blue;mso-fareast-language:CA">set_property</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">(<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">
</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;mso-fareast-language:CA">TARGET</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">
</span><b><span
style="font-size:9.5pt;font-family:Consolas;color:#008800;mso-fareast-language:CA">${GDAL_LIB_TARGET_NAME}</span></b><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">
</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;mso-fareast-language:CA">APPEND</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">
PROPERTY
</span><span
style="font-size:9.5pt;font-family:Consolas;color:blue;mso-fareast-language:CA">RESOURCE</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">
</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515;mso-fareast-language:CA">"</span><b><span
style="font-size:9.5pt;font-family:Consolas;color:#008800;mso-fareast-language:CA">${GDAL_DATA_FILES}</span></b><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515;mso-fareast-language:CA">"</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks again<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><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
style="mso-fareast-language:CA" lang="ES">De:</span></b><span
style="mso-fareast-language:CA" lang="ES"> Even Rouault
<<a href="mailto:even.rouault@spatialys.com"
moz-do-not-send="true" class="moz-txt-link-freetext">even.rouault@spatialys.com</a>>
<br>
<b>Enviado el:</b> dimecres, 17 de gener de 2024 17:13<br>
<b>Para:</b> Abel Pau <<a
href="mailto:a.pau@creaf.uab.cat"
moz-do-not-send="true" class="moz-txt-link-freetext">a.pau@creaf.uab.cat</a>>;
<a href="mailto:gdal-dev@lists.osgeo.org"
moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a><br>
<b>Asunto:</b> Re: [gdal-dev] Where to fins my own files<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Abel,<span style="font-size:12.0pt;mso-fareast-language:CA"><o:p></o:p></span></p>
<div>
<p class="MsoNormal">Le 17/01/2024 à 15:50, Abel Pau a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">Hi,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">ok
Even,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">so,
as my driver is not already online I have to do some
changes at this part of the code, don’t I?</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">At
this moment I have the file in the folder GDAL\data (my
GDAL_DATA environment variable).</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">I
call it like that.</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">aMMIDDBFFile=CPLFindFile(</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515;mso-fareast-language:CA">"gdal"</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">,
</span><span
style="font-size:9.5pt;font-family:Consolas;color:#A31515;mso-fareast-language:CA">"MM_m_idofic.csv"</span><span
style="font-size:9.5pt;font-family:Consolas;color:black;mso-fareast-language:CA">);</span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">Do
I have to move the file to somewhere? where?</span><o:p></o:p></p>
</blockquote>
<p>I've merged the PR, so you can rebase on top of latest master<o:p></o:p></p>
<p>No change required in your .cpp file<o:p></o:p></p>
<p>The only change is to move the resource file into a data/
subdirectory within your ogr/ogrsf_frmts/XXXX driver directory<o:p></o:p></p>
<p>and add in ogr/ogrsf_frmts/XXX/CMakeLists.txt <o:p></o:p></p>
<p style="margin-bottom:12.0pt"><br>
set(GDAL_DATA_FILES<br>
${CMAKE_CURRENT_SOURCE_DIR}/data/<span
style="font-size:9.5pt;font-family:Consolas;color:#A31515;mso-fareast-language:CA">MM_m_idofic.csv</span><br>
)<br>
set_property(<br>
TARGET ${GDAL_LIB_TARGET_NAME}<br>
APPEND<br>
PROPERTY RESOURCE "${GDAL_DATA_FILES}")<o:p></o:p></p>
<p>Even<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span
style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:CA"><o:p> </o:p></span></p>
<pre>-- <o:p></o:p></pre>
<pre><a href="http://www.spatialys.com" moz-do-not-send="true"
class="moz-txt-link-freetext">http://www.spatialys.com</a><o:p></o:p></pre>
<pre>My software is free, but my time generally not.<o:p></o:p></pre>
</div>
</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>