<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=utf-8">
<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
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;}
span.EstiloCorreo18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
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]-->
</head>
<body lang="CA" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi Javier,
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">thanks for your answer and congrats for being part of the PSC!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I am using GDAL functions in the some parts of the driver in order to be as GDAL-friendly as possible (like open files,
close, duplicate strings... etc) but I don’t need them if I use this code in MiraMon (We have our own functions). And it’s useful to have this variable to use them or another. In fact when I copy the code to GDAl project I can simply eliminate that and be
happy but if I can use that some places, it’s easier for maintenance.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Thanks!!<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif">De:</span></b><span lang="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Javier Jimenez Shaw <j1@jimenezshaw.com>
<br>
<b>Enviado el:</b> divendres, 22 de setembre de 2023 13:16<br>
<b>Para:</b> Abel Pau <a.pau@creaf.uab.cat><br>
<b>CC:</b> Even Rouault <even.rouault@spatialys.com>; gdal dev <gdal-dev@lists.osgeo.org><br>
<b>Asunto:</b> Re: [gdal-dev] Creation of a new driver from scratch<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I never used that env bastante before, but it seems to be what you describe. See that it is enabled also in the tests, as Even says in the pull 2666<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I'm curious. Why do you need to do something different on GDAL compilation? (I assume it is in a exported header)<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Thu, 21 Sept 2023, 15:56 Abel Pau via gdal-dev, <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Hello again!<br>
<br>
I need to know that some shared code is being compiled in GDAL project. I can see that GDAL_COMPILATION (at Preprocessor definition i Visual Studio Project) is everywhere.<br>
<br>
It's apropiate to use that variable to know if I am compiling in GDAL or not?<br>
#ifdef GDAL_COMPILATION<br>
I'm in GDAL<br>
#else<br>
I can ignore that code in gdal<br>
#endif<br>
<br>
I'm not using that in the code, only in some .h<br>
<br>
Thanks!!!<br>
<br>
<br>
-----Mensaje original-----<br>
De: Abel Pau <br>
Enviado el: dimarts, 5 de setembre de 2023 15:26<br>
Para: Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>>;
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
Asunto: RE: [gdal-dev] Creation of a new driver from scratch<br>
<br>
Hi again,<br>
after looking for that in the code, I think that versions depends on layer, so -lco is working fine (instead of -dsco, les used).<br>
So, if there is no inconvenience, I'll use -lco Version=V20, etc...<br>
<br>
Thanks again<br>
<br>
-----Mensaje original-----<br>
De: Abel Pau <<a href="mailto:a.pau@creaf.uab.cat" target="_blank">a.pau@creaf.uab.cat</a>><br>
Enviado el: dimarts, 5 de setembre de 2023 10:43<br>
Para: Abel Pau <<a href="mailto:a.pau@creaf.uab.cat" target="_blank">a.pau@creaf.uab.cat</a>>; Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>>;
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
Asunto: RE: [gdal-dev] Creation of a new driver from scratch<br>
<br>
Sorry<br>
there was a mistake. I meant: ogr2ogr src dst -dsco Version=V11 ... <br>
<br>
-----Mensaje original-----<br>
De: gdal-dev <<a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a>> En nombre de Abel Pau Enviado el: dimarts, 5 de setembre de 2023 10:26<br>
Para: Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>>;
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
Asunto: Re: [gdal-dev] Creation of a new driver from scratch<br>
<br>
Hi Everyone,<br>
<br>
Even, after a meeting with the team, we have took in consideration your opinion and we have discard the option of writing V1.1 and change to V2.0 in the middle of writing.<br>
We have a long tradition with V1.1 and we can't ignore that now but we are going to offer both possibilities: read both and write V1.1 and V2.0 according to user's choice (default 2.0).
<br>
If V1.1 is not enough for its limitations we are going to show a message:<br>
"MiraMon format limitations." and "Try V2.0 option." and return OGRERR_FAILURE;<br>
<br>
Can you confirm that is enough a -f parameter like?<br>
For version 1.1: ogr2ogr src dst - dsco=V11<br>
For version 2.0: ogr2ogr src dst - dsco=V20<br>
For last version (to make it simple for possible future versions): ogr2ogr src dst - dsco=last_version<br>
<br>
Thanks a lot for all your kind support.<br>
<br>
-----Mensaje original-----<br>
De: Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>> Enviado el: dimecres, 30 d’agost de 2023 22:57<br>
Para: Abel Pau <<a href="mailto:a.pau@creaf.uab.cat" target="_blank">a.pau@creaf.uab.cat</a>>;
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
Asunto: Re: [gdal-dev] Creation of a new driver from scratch<br>
<br>
Abel,<br>
><br>
> I am interested in proportionate 3 ways of proceeding when a used calls translation from one format to our format.<br>
> way 1: force to write V1.1 and stop writing features if the limit is reached.<br>
> way 2: force to write V2.0 (and stop writing features if the limit is reached (it will no happen in a near future, I think)).<br>
> way 3: leave that the program decides if V1.1 is not enough and then it changes automatically to V2.0. It does it in the middle of the process, when FID or some used internal offset gets the limit.<br>
<br>
Not knowing anything about the ecosystem of the miramon format, but ideally I would bend on the side of simplicity if possible, and I would just write V2.0 if V1.1 can be considered as a legacy format, that deserves perhaps only read-only support (at our times
of terabytes+ storage capacity, the saving of 4 bytes per feature seems like a anachronic concern). But if you really want to use V1.1 when possible and V2.0 only when possible, and provided that you implement the writing of the final file only at dataset
closing as it was my understanding, then you know already the max(FID) of features that have been passed to CreateFeature, so you could decide automatically the version needed. I would strongly discourage starting writing a V1.1 file and then switching to
V2.0 in the middle of the writing. That sounds like a serious complication.<br>
<br>
><br>
> So, my questions:<br>
> 1.- Which ogr2ogr parameter is the best for doing that?<br>
> -f? specificating "MiraMon V1.1" or "MiraMonV2.0" or "MiraMon" (automatic way).<br>
<br>
If you really need to implement the 2 formats, a dataset creation option in a single driver would probably be better.<br>
<br>
<br>
> Or there is another way I haven't seen (I've read all options <br>
> in <a href="https://gdal.org/programs/ogr2ogr.html#ogr2ogr" target="_blank">https://gdal.org/programs/ogr2ogr.html#ogr2ogr</a>)<br>
><br>
> 2.- When using -progress some points appear on screen informing the progress. At the end of the progress (or sometimes driver requires) there is a gap of time that driver is writing some pendant information.<br>
-progress works by counting the number of features in the source layer, and computing the progress percentage at each call to CreateFeature()<br>
> There is any way to inform the user what the process is doing?<br>
<br>
Not really. You could possibly implement it using CPLDebug() statements if you want to monitor the progress in debug mode (the GeoPackage driver implemets something similar during spatial index writing, which can be a long operation), but there's nothing dedicated
in the OGR API or ogr2ogr to monitor the progress of long operations occuring during dataset closing, as most drivers don't need that.<br>
<br>
Even<br>
<br>
<br>
--<br>
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a><br>
My software is free, but my time generally not.<br>
<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>