<div dir="ltr"><div>That sounds very similar to BIGTIFF option in GeoTIFF driver.<br></div>also a bit like GEOTIFF_VERSION option.<br><div><div><a href="https://gdal.org/drivers/raster/gtiff.html">https://gdal.org/drivers/raster/gtiff.html</a></div><div><br></div></div><div>You can change that in the middle of the writing? wow.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">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:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div>