Le 14/12/2023 à 17:36, Abel Pau via gdal-dev a écrit :
Hi, today I have a very inside-code question...
I’m wondering why when I want to translate from .SHP to MiraMonFile
(.PNT) and the destinatination file already exists I seems that the
call stack reveals a way that is weird for me and I would like to
understand:
Translate->Create->(then, as it extist) QuietDelete ->Detele
->Open.... *(why Open if I have to delete?)*
The answer lies in the code:
https://github.com/OSGeo/gdal/blob/master/gcore/gdaldriver.cpp#L1642
The default Delete() implementation needs to know the file list
composing the dataset (for example shapefile datasets are made of
multiple files) by calling GDALDataset::GetFileList()
An alternative is that your driver implements the GDALDriver::pfnDelete
callback, but I would do that only if the Open() in your driver is
particularly slow (most drivers have a fast Open() method)
--
http://www.spatialys.com
My software is free, but my time generally not.
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev