[GRASS-dev] RE: [GRASS-user] MASK seems to be ignored
Patton, Eric
epatton at nrcan.gc.ca
Wed Feb 6 11:07:12 EST 2008
>> 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 |
| Rows: 1136 |
| Columns: 1249 |
| Total Cells: 1418864 |
| Projection: UTM (zone 20) |
| N: 5119638 S: 5118502 Res: 1 |
| E: 491292 W: 490043 Res: 1 |
| Range of data: min = -2.809999 max = 1.246000 |
| |
| Data Description: |
| generated by r.mapcalc |
| |
| Comments: |
| EC_Charlottetown_Bathy_November_2007_1m_fill - |
| EC_Charlottetown_Bathy_October_2007_1m |
| |
+----------------------------------------------------------------------------+
>I'm assuming that the original does contain nulls (otherwise the
>r.mapcalc method wouldn't do anything either). Is the original map a
>reclass map?
Yes, the original contains nulls. The original map is not a reclass, but the cell
values do cross through zero, if that matters.
>The r.mapcalc method creates a completely new map, while r.mask
>creates a reclass map. A reclass map takes much less space, but is
>affected by any changes to the underlying map (which can be good or
>bad, depending upon what you want), and may be susceptible to a
>different set of bugs, quirks and corner cases than a normal
>(non-reclass) map.
Good to know; I'll use the r.mapcalc method as it seems a bit more immune to
strangeness. I'll add some hints about this in the r.mask docs, too.
~ Eric.
More information about the grass-dev
mailing list