The computational region (i.e., not the display region in the GUI) is the rectangular section of the world where GIS operations take place. With a few exceptions, all reads/writes to maps take place only within the region. You can set the region extents and resolution in many ways using g.region. You can also save region definitions to disk and call them as needed. For example, you could have a "north" and a "south" saved region and set map operations to alternately work in each of these using g.region region=north or g.region region=south.
Please look over the g.region manual and the general GRASS help for more information on regions. The docs are pretty good. ____________________ C. Michael Barton Director, Center for Social Dynamics & Complexity Professor of Anthropology, School of Human Evolution & Social Change Arizona State University voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC) fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC) www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu On Nov 28, 2012, at 5:37 AM, <[email protected]<mailto:[email protected]>> wrote: From: Andranik Hayrapetyan <[email protected]<mailto:[email protected]>> Subject: Re: [GRASS-user] Parallel GRASS jobs ..... Date: November 28, 2012 4:41:47 AM MST To: Sylvain Maillard <[email protected]<mailto:[email protected]>> Cc: grass mailing list <[email protected]<mailto:[email protected]>> I think I don't understand the concept of region itself. Here is the output of my g.region -p projection: 0 (x,y) zone: 0 north: 4569989.25 south: 4357350.75 west: 436605.75 east: 670334.25 nsres: 28.5 ewres: 28.5 rows: 7461 cols: 8201 cells: 61187661 Please, can you tell me how to reduce this region into 2 chunks. Thanks in advance On Wed, Nov 28, 2012 at 2:43 PM, Sylvain Maillard <[email protected]<mailto:[email protected]>> wrote: > 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 <[email protected]<mailto:[email protected]>> 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 <[email protected]<mailto:[email protected]>> 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 <[email protected]<mailto:[email protected]>> 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 [email protected]<mailto:[email protected]> http://lists.osgeo.org/mailman/listinfo/grass-user _______________________________________________ grass-user mailing list [email protected]<mailto:[email protected]> http://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
