[GRASS-user] Parallel GRASS jobs .....

Sylvain Maillard sylvain.maillard at gmail.com
Wed Nov 28 02:43:41 PST 2012


> I was trying to do that with g.region, but it only resized my map and
didn't "cut" it.
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.

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.
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"

Sylvain


2012/11/28 Daniel Lee <lee at isi-solutions.org>

> Hi there,
>
> 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:
>
> GRASS 6.4.3svn (EPSG4326_WGS84_ll):~ > g.region -g
> n=63
> s=-63
> w=95
> e=180
> nsres=1.10020395685734e-05
> ewres=1.10020399076346e-05
> rows=11452422
> cols=7725840
> cells=88479579984480
>
> Then to reduce the region's size I'd do e.g.:
> g.region n=50 s=-50 w=100 e=110
>
> That would "shrink" my region down to the area that I'm interested in.
>
> HTH!
> Daniel
>
>
>
> 2012/11/28 Andranik Hayrapetyan <andranik.h89 at gmail.com>
>
>> 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.
>> Is g.region the right tool for this task?
>> If it is not difficult for you, can you, please, explain the process of
>>  doing  " *define the region of each mapset as a chunk of the whole
>> region* " a bit more detailed.
>>
>>
>> On Wed, Nov 28, 2012 at 1:56 PM, Sylvain Maillard <
>> sylvain.maillard at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> for this approach, the best would be to
>>> (before the multi-process job)
>>> - put your map into the PERMANENT mapset
>>>
>>> (for each process in parallel)
>>> - make a new mapset for each process
>>> - define the region of each mapset as a chunk of the whole region
>>> - make your calculation
>>>
>>> (once the process competed)
>>> - put together all the results (eg, with r.patch)
>>>
>>>
>>> Sylvain
>>>
>>>
>>>
>>> _______________________________________________
>>> grass-user mailing list
>>> grass-user at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>>
>>>
>>
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>>
>
-------------- section suivante --------------
Une pi?ce jointe HTML a ?t? nettoy?e...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20121128/ca1d8632/attachment-0001.html>


More information about the grass-user mailing list