<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">I am looking into distributed processing of raster data in GRASS,</div><div class=""><br class=""></div><div class="">I found this in i.smap/read_block.c</div><div class=""><br class=""></div><div class="">Would that be a good idea to include something similar into the raster lib API?</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #78492a" class="">#include </span><stdlib.h></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #78492a" class="">#include </span><grass/raster.h></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #78492a" class="">#include </span><grass/imagery.h></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #78492a" class="">#include </span><grass/glocale.h></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #78492a" class="">#include </span>"bouman.h"</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #78492a" class="">#include </span>"region.h"</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">int</span> read_block(DCELL *** img,<span class="Apple-tab-span" style="white-space:pre">      </span><span style="font-variant-ligatures: no-common-ligatures; color: #008400" class="">/* img[band][row[col] */</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">    </span>       <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">struct</span> Region *region, <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">struct</span> files *files)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">{</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">int</span> band, row, col;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    for (band = <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span>; band < files->nbands; band++) {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">  </span>for (row = region->ymin; row < region->ymax; row++) {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>    Rast_get_d_row(files->band_fd[band], files->cellbuf, row);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>    for (col = region->xmin; col < region->xmax; col++)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre">            </span>img[band][row][col] = files->cellbuf[col];</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    }</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    <span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">return</span> <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0</span>;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">}</div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">Cheers,</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">Yann</div></body></html>