[GRASS-user] Interactive editing (was: Memory issues)

On Mon, 16 Jul 2018, Rich Shepard wrote:

This suggests that the solution is to create a mask and generate the
contours only within that area.

   In the monitor I displayed the DEM and a couple of reference vectors, then
zoomed to an area within which I want to create a vector area to use as a
mask. I've not found a method that lets me do this interactively.

   First, I tried a vector map edit and gave it the name 'analysis_area'. The
monitor removed the current display and left a white board on which to draw,
but I had no reference points because the raster DEM and vector features
were not visible.

   Second, I tried a raster map edit and provided the same name along with
the raster DEM as a background. This produced a white rectangle in the
middle of the display and again I could not see the background so I could
not draw an area boundary.

   What is the proper process to use a displayed map while drawing an area
boundary (vector, or raster that can be converted to a vector) and seeing
where the edits are located?

Rich

I don’t think there’s any need for manual editing. What I do is change the regions settings to the area of interest. Then almost all raster calculations work only inside that region. So:

···

On 07/17/2018 01:12 AM, Rich Shepard wrote:

On Mon, 16 Jul 2018, Rich Shepard wrote:

This suggests that the solution is to create a mask and generate the
contours only within that area.

In the monitor I displayed the DEM and a couple of reference vectors, then
zoomed to an area within which I want to create a vector area to use as a
mask. I’ve not found a method that lets me do this interactively.

First, I tried a vector map edit and gave it the name ‘analysis_area’. The
monitor removed the current display and left a white board on which to draw,
but I had no reference points because the raster DEM and vector features
were not visible.

Second, I tried a raster map edit and provided the same name along with
the raster DEM as a background. This produced a white rectangle in the
middle of the display and again I could not see the background so I could
not draw an area boundary.

What is the proper process to use a displayed map while drawing an area
boundary (vector, or raster that can be converted to a vector) and seeing
where the edits are located?

# First save the current settings for restoring later
g.region save=FULL_REGION
# Now reduce the region (leave the resolution as is)
g.region -ap n=<max y> s=<min y> e=<max x> w=<min x>
# Do your stuff
r.contour input=<your DEM> output=contours
# If you really need a vector rectangle bounding the small analysis area region then
v.in.region output=analysis_area
# In future you get back to this smaller region with g.region -ap vect=analysis_area

# Now, if necessary, return to the full region with
g.region -ap region=FULL_REGION

Rich


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918

On Tue, 17 Jul 2018, Micha Silver wrote:

I don't think there's any need for manual editing. What I do is change the
regions settings to the area of interest. Then almost all raster
calculations work only inside that region. So:

Micha,

   I did not think of changing the region, only of creating a mask, based on
the thread I started on regions vs. masks.

# First save the current settings for restoring later
g.region save=FULL_REGION

   I have this saved as the default region.

# Now reduce the region (leave the resolution as is)
g.region -ap n=<max y> s=<min y> e=<max x> w=<min x>

   I do this by moving the cursor from side to side and recording the
displayed coordinates. And, I can save as many named regions as needed and
apply them for the entire area or specific sub-areas. I like this and it
avoids the constraints of trying to interactively create boundaries over a
displayed raster map.

# Do your stuff
r.contour input=<your DEM> output=contours
# If you really need a vector rectangle bounding the small analysis area region then
v.in.region output=analysis_area
# In future you get back to this smaller region with g.region -ap vect=analysis_area

# Now, if necessary, return to the full region with
g.region -ap region=FULL_REGION

   Sometimes we get stuck in a rut and cannot see over the rim to other
solutions. Thanks very much for the detailed lesson.

Toda raba,

Rich