[GRASS-user] MASK seems to be ignored
Glynn Clements
glynn at gclements.plus.com
Thu Feb 7 09:01:18 EST 2008
Patton, Eric wrote:
> >> Checking the range of the raster I used for a mask in my
> >> r.mask command, it was 0-32767; so shouldn't r.mask in=MAP also create a mask
> >> where any non-null cell in the input raster exists?
> >>
> >> Here's the output from r.info for the mask I created using r.mask:
>
> >MASK maps usually look like this. It would be more useful to see the
> >r.info output for the original map.
>
> r.info output for original map from which the mask was created:
>
> $ r.info Diff_Nov2007_Oct2007_1m
> +----------------------------------------------------------------------------+
> | Layer: Diff_Nov2007_Oct2007_1m Date: Mon Feb 4 14:10:04 2008 |
> | Mapset: PERMANENT Login of Creator: epatton |
> | Location: Charlottetown |
> | DataBase: /home/epatton/Projects |
> | Title: ( Diff_Nov2007_Oct2007_1m ) |
> | Timestamp: none |
> |----------------------------------------------------------------------------|
> | |
> | Type of Map: raster Number of Categories: 255 |
> | Data Type: FCELL |
> | Range of data: min = -2.809999 max = 1.246000 |
Reclassing is designed for integer maps. It's possible that there are
bugs or quirks when used with FP maps. In particular, there is
separate code to read the mask, so it's possible that reading a
particular map as a mask and reading it as a normal map (e.g.
"d.rast MASK") could produce different results.
I suggest using the r.mapcalc approach with FP maps.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list