<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">Le 30/11/2021 à 16:33, Javier Jimenez
Shaw a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CADRrdKs4cFV2+wB0_XM+ixBAu=LNcvWEH4DU-4kysx6gGp9egw@mail.gmail.com">
<div dir="ltr">
<div>Hi</div>
<div><br>
</div>
<div>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.<br>
</div>
<div>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.</div>
<div><br>
</div>
<div>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.</div>
</div>
</blockquote>
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<br>
<blockquote type="cite"
cite="mid:CADRrdKs4cFV2+wB0_XM+ixBAu=LNcvWEH4DU-4kysx6gGp9egw@mail.gmail.com">
<div dir="ltr">
<div><br>
</div>
<div>Is there a way to cancel efficiently that process?</div>
<div><br>
</div>
<div>Thanks.<br>
</div>
<div>
<div>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">.___ ._ ..._ .. . ._.
.___ .. __ . _. . __.. ... .... ._ .__<br>
Entre dos pensamientos racionales <br>
hay infinitos pensamientos irracionales.<br>
<br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>