[gdal-dev] Cancel DXF writing

Even Rouault even.rouault at spatialys.com
Tue Nov 30 08:28:22 PST 2021


Le 30/11/2021 à 16:33, Javier Jimenez Shaw a écrit :
> Hi
>
> I want to cancel the writing of a DXF file. It has, let's say, a 
> million points. Before adding each point I check if the user canceled 
> the task.
> I have noticed that while I am writing point by point, the actual file 
> in the disk that is growing is called "file.dxf.tmp", and only when I 
> close the dataset it really writes "file.dxf", deleting the tmp one.
>
> When the user cancels the process, I want to top writing and delete 
> the file. I am calling the method MarkSuppressOnClose() , but I see 
> that still the "file.dxf" is created... and then removed. This final 
> step may take a long time, that is not needed at all.
I haven't looked at the details of the driver, but it seems to be you 
would need to modify the driver so he looks at the flag and does the 
needed cleanup and not try to write the final file. Pull request welcome
>
> Is there a way to cancel efficiently that process?
>
> Thanks.
> .___ ._ ..._ .. . ._. .___ .. __ . _. . __..  ... .... ._ .__
> Entre dos pensamientos racionales
> hay infinitos pensamientos irracionales.
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
http://www.spatialys.com
My software is free, but my time generally not.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20211130/d5bdcda7/attachment.html>


More information about the gdal-dev mailing list