<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="ES" 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="ES" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">thanks for your answer.
</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">It’s very similar, yes. I’ll try to use it in my driver.<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">While fetching features I have some information in memory (always 64bits variables) and some in memory-disk (it’s a buffer
that writes everything in disk when it’s full as many times as needed).<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">If, in the middle of writing I find that user wants AUTO and I was writing in 32bits but it’s no possible anymore then
I translate the written part from 32 to 64 (and I do nothing with the memory part).<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">At the end when I write the memory part I take care of what option is the good one.<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 could always write 64bits format but if it’s not needed it’s a pity to waste disk memory for that.<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">This consumes time but if you can’t know the number of features (or vertices in 3D, which they also need 64bits offsets)
a priori I think that’s the only way to do that or don’t implement AUTO and let user find out that user cannot write 32bits option for a large translation. And make user begin again. I think that if I can save some time it’s better than start again.<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">For me the best option is knowing at the beginning what option is enough to write every file.<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">Sorry for the extension of my words.<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">It remains knowing how to inform user (when I use –progress) that I am starting again... I suppose that a message in the
middle of the % points.<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">And by the way... how can GDAL know the % if the number of features is not reachable?<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"><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"><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"><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> dimecres, 30 d’agost de 2023 15:39<br>
<b>Para:</b> Abel Pau <a.pau@creaf.uab.cat><br>
<b>CC:</b> 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>
<div>
<p class="MsoNormal">That sounds very similar to BIGTIFF option in GeoTIFF driver.<o:p></o:p></p>
</div>
<p class="MsoNormal">also a bit like GEOTIFF_VERSION option.<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><a href="https://gdal.org/drivers/raster/gtiff.html">https://gdal.org/drivers/raster/gtiff.html</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<div>
<p class="MsoNormal">You can change that in the middle of the writing? wow.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, 30 Aug 2023 at 06:21, Abel Pau <<a href="mailto:a.pau@creaf.uab.cat">a.pau@creaf.uab.cat</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">Hi again,<br>
I hope you have had nice holidays!<br>
<br>
In my journey to writing a new driver now I have a doubt.<br>
<br>
Our format can be written in two versions:<br>
v1.1: internal offsets and FID are only saved in 4 bytes. So, there is a limited number of FID you can read/write.<br>
v2.0: internal offsets and FID are only saved in 8 bytes. So, there is a huge number of FID you can read/write.<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>
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>
Or there is another way I haven't seen (I've read all options 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>
There is any way to inform the user what the process is doing?<br>
<br>
Thanks in advance. I appreciate all your always kind answers.<br>
Abel.<br>
<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<br>
Enviado el: divendres, 9 de juny de 2023 12:11<br>
Para: Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>><br>
CC: <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>
<br>
Finally I managed to use CMake to create a Visual Studio sln. And it's beautiful see all drivers there.<br>
But it's not crear for me what I have to modify (Cmakelist.txt,.. or something else) to include the new driver. I need it to be there to be able to debug.<br>
I created a copy of, let's say, Shape and modified the Cmakelists.txt in an apropriate way... but I miss something because recompiling and rebuilding doesn't change anything and my driver is not in the project.<br>
<br>
Anyone can make me a simple list of which files I have to modify?<br>
THANKS in advance!!!<br>
<br>
Abel.<br>
<br>
-----Mensaje original-----<br>
De: Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>> Enviado el: divendres, 2 de juny de 2023 20:34<br>
Para: Abel Pau <<a href="mailto:a.pau@creaf.uab.cat" target="_blank">a.pau@creaf.uab.cat</a>><br>
CC: <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>; Howard Butler <<a href="mailto:howard@hobu.co" target="_blank">howard@hobu.co</a>><br>
Asunto: Re: [gdal-dev] Creation of a new driver from scratch<br>
<br>
<br>
> It is indeed desired that the code style of the contribution matches GDAL's style to some degree. GDAL provides a .clang-format file that might be helpful when you are editing to provide some automated conformance.<br>
<br>
Cf <a href="https://gdal.org/development/dev_practices.html#commit-hooks" target="_blank">
https://gdal.org/development/dev_practices.html#commit-hooks</a> also to install pre-commit hooks to ensure the formatting is OK & fix it if not.<br>
<br>
<a href="https://gdal.org/development/rfc/rfc8_devguide.html" target="_blank">https://gdal.org/development/rfc/rfc8_devguide.html</a> also gives some hints on the general development practices. Generally try to stick with the conventions you observe in source
code of drivers you take inspiration from.<br>
<br>
><br>
> You might be able to build a sln file using GDAL's CMake configuration, but there is no standard documentation about how to do this. Do know that most any configuration you provide must build and work with the standard GDAL CMake configuration which is typically
invoked through the command line.<br>
<br>
The source of "truth" will be the CMakeLists.txt file.<br>
<br>
sln files are just a possible by-product of CMake that isn't stored in git.<br>
<br>
You may just google "Cmake visual studio" as there's nothing GDAL specific regarding this topic. ==><br>
<a href="https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170" target="_blank">https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170</a><br>
among other links that you'll get<br>
<br>
><br>
>> · Once I have a Visual Studio solution (sln) to inspire myself, how should I proceed to create the driver? Is there any pre-existing pattern or template to follow?<br>
> Find an existing raster or vector driver in the project that matches MiraMon's vector or raster format and use it as a skeleton.<br>
><br>
>> I would like to be able to debug it.<br>
> Familiarize yourself with GDAL's tests (a good place to learn is to look at GDAL's CI configuration), get tests running locally on your machine, and then write tests that provide test coverage for your raster or vector driver.<br>
For vector drivers, the test_ogrsf utility that is built with GDAL is used by most unit tests of vector drivers to check their compliance w.r.t expectations of what a driver should do/not do. Not that of course this is only generic testing. You also need to
add tests that check that the content you read from a test file is the one you expect.<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>