<div dir="ltr">Jose,<div><br></div><div style>I'm sorry, but I don't think this will work trivially. </div><div style><br></div><div style>If you write a small part of an image, GDAL is likely to read a larger area, update that and write it back. If other programs happen to try and update the same larger area at the same time some data is likely to be lost. </div>
<div style><br></div><div style>If you are careful to write on tile/block boundaries, and use an output file that preinitializes everything then it might work but it is likely to be somewhat fragile. </div><div style><br>
</div><div style>Best regards,</div><div style>Frank</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, May 20, 2013 at 3:46 PM, Jose Gomez-Dans <span dir="ltr"><<a href="mailto:jgomezdans@gmail.com" target="_blank">jgomezdans@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi,<br></div>I have a rather demanding processing scheme (read data from files, and process pixel per pixel). It's trivial to parallelise (just do pixels in different machines/cores), and I intend to run this on several machines on our cluster.<br>
<br>I'm unsure whether I can use GDAL (python bindings) like this. My idea would be to first create the output files. After this, the scene is split into several windows, and different works start processing the different windows. Once a worker is done, it gets a handle to the created file and writes a chunk to it, closes the handle an exits. <br>
<br></div>Questions are: does this "create and fill" make sense? Do I need to lock the output files, or can I just write to the file handles (the windows don't overlap)? Is this format dependent? Am I missing something? I'd rather avoid creating lots of intermediate files to then stitch up.<br>
<br>Thanks!<span class="HOEnZb"><font color="#888888"><br>Jose<br></font></span></div></div>
<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>light and sound - activate the windows | <a href="http://pobox.com/~warmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush | Geospatial Software Developer<br>
</div>