[GRASS-user] Setting Region from Display

   I use d.zoom to set the extents I want for the project mapset and see the
northern and eastern coordinates of this area. If I use g.region n=<values>
e=<values> res=30 I assume that the southern and western bounds will be
calculated as a round number of the resolution within the displayed window.
Is this correct?

   If not, what is the preferred approach to interactively defining a region
and saving it as the default for that mapset?

Rich

On Wed, 27 Jul 2011, Rich Shepard wrote:

I use d.zoom to set the extents I want for the project mapset and see the
northern and eastern coordinates of this area. If I use g.region
n=<values> e=<values> res=30 I assume that the southern and western bounds
will be calculated as a round number of the resolution within the
displayed window. Is this correct?

   Searching my saved mail list threads I found the answer: v.in.region
out=<region_name>. However, I have not found the follow up to this: now that
I have defined my limited analytical region, how do I clip the large maps
(and their associated attribute data) to this area?

   For example, there are almost 805,000 stream/river reaches in the state
and many fewer in my area of interest; there are 4204 drainage basins
(12-digit resolution) in the state and only about 18 within my analysis
area.

   What command deletes everything outside the current region?

Rich

On Wed, 27 Jul 2011, Rich Shepard wrote:

Searching my saved mail list threads I found the answer: v.in.region
out=<region_name>. However, I have not found the follow up to this: now
that I have defined my limited analytical region, how do I clip the large
maps (and their associated attribute data) to this area?

   Well, that didn't work as expected. When I kill the monitor and start the
GUI I see only the bottom portion of the zoomed maps. Back to the drawing
board.

Rich

On Wed, 2011-07-27 at 10:13 -0700, Rich Shepard wrote:

On Wed, 27 Jul 2011, Rich Shepard wrote:

>  Searching my saved mail list threads I found the answer: v.in.region
> out=<region_name>. However, I have not found the follow up to this: now
> that I have defined my limited analytical region, how do I clip the large
> maps (and their associated attribute data) to this area?

   Well, that didn't work as expected. When I kill the monitor and start the
GUI I see only the bottom portion of the zoomed maps. Back to the drawing
board.

First you’ll want to set your analytical region with g.region (use all four parameters, n-= s= e= w=. If you don’t specifiy any one of them, it will stay as it was.)
Now, for rasters, just run:
r.mapcalc =
Since r.mapcalc honors the current region, the new rasters will be limited to the new region

Next you can use the v.in.,region to get a rectangular vector of the current region, and use that with v.overlay to clip your various line and polygon vectors like:
v.overlay a_in=streams b_in=analytical_region_vector out=streams_clipped

v.overlay should merge all data columns into the resulting output vector.


Micha

Rich
_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/grass-user](http://lists.osgeo.org/mailman/listinfo/grass-user)

This mail was received via Mail-SeCure System.