> I was trying to do that with g.region, but it only resized my map and didn't "cut" it.
<div>In fact it didn't modify your map, but resize the area where the calculation is done byt hte other modules : with a small region defined in a mapset, your code will work only on that part of the map in the PERMANENT mapset.<br>
<br>as an example with a region of n=100 s=0 e=100 w=0, you can pass the region limits to your script (eg: my_script.sh 50 0 50 0;  my_script.sh 100 50 50 0; ...) so the calculation are made only of a quarter of the whole region.<br>
if your script can handle arguments, it will the first define its own sub-region from what you passed to it: "g.region n=$1 s=$2 e=$3 w=$4"<br><br></div><div class="gmail_extra">Sylvain<br><br><br><div class="gmail_quote">
2012/11/28 Daniel Lee <span dir="ltr"><<a href="mailto:lee@isi-solutions.org" target="_blank">lee@isi-solutions.org</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi there,<br><br>I do this too and the standard methodology for me is to leave the resolution the same and change the region's borders. Take a look at the manual of g.region for guides on this, but let's say I've got the following:<br>


<br>GRASS 6.4.3svn (EPSG4326_WGS84_ll):~ > g.region -g<br>n=63<br>s=-63<br>w=95<br>e=180<br>nsres=1.10020395685734e-05<br>ewres=1.10020399076346e-05<br>rows=11452422<br>cols=7725840<br>cells=88479579984480<br><br>Then to reduce the region's size I'd do e.g.:<br>


g.region n=50 s=-50 w=100 e=110<br><br>That would "shrink" my region down to the area that I'm interested in.<br><br>HTH!<span class=""><font color="#888888"><br>Daniel</font></span><div class=""><div class="h5">
<br><div class="gmail_extra"><br><br><div class="gmail_quote">2012/11/28 Andranik Hayrapetyan <span dir="ltr"><<a href="mailto:andranik.h89@gmail.com" target="_blank">andranik.h89@gmail.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I have been trying something like this some time ago, but I could not define region of a mapset as chunk of the whole region. <div>
Is g.region the right tool for this task? </div><div>If it is not difficult for you, can you, please, explain the process of  doing  " <i>define the region of each mapset as a chunk of the whole region</i> " a bit more detailed.</div>



<div><br></div><div><br><div class="gmail_quote"><div><div>On Wed, Nov 28, 2012 at 1:56 PM, Sylvain Maillard <span dir="ltr"><<a href="mailto:sylvain.maillard@gmail.com" target="_blank">sylvain.maillard@gmail.com</a>></span> wrote:<br>



</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>Hi,<br><br>for this approach, the best would be to<br>(before the multi-process job)<br>


- put your map into the PERMANENT mapset<br>
<br>(for each process in parallel)<br>- make a new mapset for each process<br>- define the region of each mapset as a chunk of the whole region<br>
- make your calculation<br><br>(once the process competed)<br>- put together all the results (eg, with r.patch)<span><font color="#888888"><br><br><br>Sylvain<br><br><br>
</font></span><br></div></div>_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>