<div>I think I don't understand the concept of region itself. Here is the output of my g.region -p</div><div><div>projection: 0 (x,y)</div><div>zone: 0</div><div>north: 4569989.25</div><div>south: 4357350.75</div>
<div>west: 436605.75</div><div>east: 670334.25</div><div>nsres: 28.5</div><div>ewres: 28.5</div><div>rows: 7461</div><div>cols: 8201</div><div>cells: 61187661</div></div><div><br></div>
<div>Please, can you tell me how to reduce this region into 2 chunks.</div><div><br></div><div>Thanks in advance </div><div><br></div><br><br><div class="gmail_quote">On Wed, Nov 28, 2012 at 2:43 PM, Sylvain Maillard <span dir="ltr"><<a href="mailto:sylvain.maillard@gmail.com" target="_blank">sylvain.maillard@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 class="im">> I was trying to do that with g.region, but it only resized my map and didn't "cut" it.
</div><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">
<div class="im">
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><font color="#888888"><br>Daniel</font></span></div><div><div>
<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"><div class="im">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>
<div class="im"><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></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</blockquote></div><br>