<div dir="ltr"><div><br></div>My take on this is that it's expensive to write to a temporary file and then copy it. Some output files very are large. Since you, the user, are the one interrupting the process, it seems that it's up to you to clean up. This behavior is also consistent with most other programs.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 10, 2020 at 5:50 AM Peder Axensten <<a href="mailto:Peder.Axensten@slu.se">Peder.Axensten@slu.se</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!<br>
<br>
If pdal is interrupted while saving to the destination file, it might result in a corrupt file. This is not unreasonable, but could be avoided.<br>
<br>
We use a make script to process large amounts of files and sometimes we have to interrupt processing for different reasons. We then risk to have corrupt files that make will consider final when rerunning the script, so the files are left in a corrupt state.<br>
<br>
Would it be a good idea to make pdal by default save the contents to a temporary file and then move the temporary file to the destination file? This way either a correct file is produced or nothing. I'm implementing this in the make script – it is somewhat cumbersome but will work ok, I guess.<br>
<br>
Isn’t it a very attractive and useful guarantee: if the destination file is produced, then it is correct?<br>
<br>
Best regards,<br>
<br>
Peder Axensten<br>
Research engineer<br>
<br>
Remote Sensing<br>
Department of Forest Resource Management<br>
Swedish University of Agricultural Sciences<br>
SE-901 83 Umeå<br>
Visiting address: Skogsmarksgränd<br>
Phone: +46 90 786 85 00<br>
<a href="mailto:peder.axensten@slu.se" target="_blank">peder.axensten@slu.se</a>, <a href="http://www.slu.se/srh" rel="noreferrer" target="_blank">www.slu.se/srh</a><br>
<br>
The Department of Forest Resource Management is environmentally certified in accordance with ISO 14001.<br>
<br>
---<br>
När du skickar e-post till SLU så innebär detta att SLU behandlar dina personuppgifter. För att läsa mer om hur detta går till, klicka här <<a href="https://www.slu.se/om-slu/kontakta-slu/personuppgifter/" rel="noreferrer" target="_blank">https://www.slu.se/om-slu/kontakta-slu/personuppgifter/</a>><br>
E-mailing SLU will result in SLU processing your personal data. For more information on how this is done, click here <<a href="https://www.slu.se/en/about-slu/contact-slu/personal-data/" rel="noreferrer" target="_blank">https://www.slu.se/en/about-slu/contact-slu/personal-data/</a>><br>
_______________________________________________<br>
pdal mailing list<br>
<a href="mailto:pdal@lists.osgeo.org" target="_blank">pdal@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/pdal" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/pdal</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Andrew Bell<br><a href="mailto:andrew.bell.ia@gmail.com" target="_blank">andrew.bell.ia@gmail.com</a></div>