Re: [GRASS-user] cutting issue (again): r.mapcalc vs. r.resample

2010-01-25 Thread Achim Kisseler

Did you do:
g.copy rast=boundary_raster,MASK
or alternatively:
r.mask input=boundary_raster -o
(-o for overwrite)
?





Tim Michelsen schrieb:

Hello,
I while ago I asked how to cut a small map from a larger one using the
region settings as boundary for the small map:
http://n2.nabble.com/r-mapcalc-changes-color-table-td4072836.html#a4072836

I tried this again:

Approach 1: r.mapcalc

r.mapcalc cut=if(boundary_raster, large_map,
null())

Approach 2: r.resample

r.resample input=large_map output=cut

I notice the that using Approach 2, the areas that was outside the set
region is white. The underlayung rasters are not visible (or only if I
set the opacity of cut to a low value).
If I use Approach 1 with r.mapcalc, the areas outside the region are
really NULL() (=transparent) and underlaying larger rasters are visible.
Only that the result cut from r.mapcalc has a new colortable.

Am I doing something wrong?
Why is the no such command r.cut?

Thanks in advance for your help,
Timmie

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

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


Re: [GRASS-user] cutting issue (again): r.mapcalc vs. r.resample

2010-01-25 Thread Achim Kisseler

And more:
-%--

...The category values in the new raster output map layer will be the 
same as those in the original, except that the resolution and extent of 
the new raster output map layer will match those of the current 
geographic region settings (see g.region)


-%--

Achim

Tim Michelsen schrieb:

Hello,
I while ago I asked how to cut a small map from a larger one using the
region settings as boundary for the small map:
http://n2.nabble.com/r-mapcalc-changes-color-table-td4072836.html#a4072836

I tried this again:

Approach 1: r.mapcalc

r.mapcalc cut=if(boundary_raster, large_map,
null())

Approach 2: r.resample

r.resample input=large_map output=cut

I notice the that using Approach 2, the areas that was outside the set
region is white. The underlayung rasters are not visible (or only if I
set the opacity of cut to a low value).
If I use Approach 1 with r.mapcalc, the areas outside the region are
really NULL() (=transparent) and underlaying larger rasters are visible.
Only that the result cut from r.mapcalc has a new colortable.

Am I doing something wrong?
Why is the no such command r.cut?

Thanks in advance for your help,
Timmie

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

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


Re: [GRASS-user] cutting issue (again): r.mapcalc vs. r.resample

2010-01-25 Thread Rich Shepard

On Mon, 25 Jan 2010, Tim Michelsen wrote:


I while ago I asked how to cut a small map from a larger one using the
region settings as boundary for the small map:
http://n2.nabble.com/r-mapcalc-changes-color-table-td4072836.html#a4072836



I tried this again:
Approach 1: r.mapcalc
Approach 2: r.resample



Am I doing something wrong?


Tim,

  Looks like it.

  I asked for guidance on doing just what you need to do: cut out the
project area from a larger DEM.

  The approach that worked for me was described by Helmut Kudrnovsky:

  1) zoom to your area of interest of your larger region.

  2) v.in.region e.g. v.in.region output=testarea, so the extent of your
  area of interest is defined by the vector testarea

  3) g.region vect=testarea, by this  the region is set to your area of
  interest for analysis. This region defines the geographic area in which
  all GRASS displays and raster analyses will be done.

  Works like a charm.

Rich



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


Re: [GRASS-user] cutting issue (again): r.mapcalc vs. r.resample

2010-01-25 Thread Rich Shepard

On Mon, 25 Jan 2010, Hamish wrote:


the v.in.region and g.region vect= steps are redundant, but make sure when
you zoom you update the computational region, not just the display one in
the GUI (d.zoom + d.mon does this automatically)


Hamish,

  Good to know. Thanks.

  I'm a CLI person so I use the GUI only to start GRASS because I've hated
that crude, mid-1980s ncurses starting interface for years. Otherwise I much
prefer to work in a virtual console at the command line. Much more
comfortable for me. However, I will concede that I've found the LaTeX GUI
front-end, LyX, to be much quicker and more productive than writing LaTeX in
emacs. So I'm not totally averse to using the pointy-thingie when it's
demonstrably more productive. :-)

Rich
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user