[GRASSLIST:6559] Re: MASK confussion
Hamish
hamish_nospam at yahoo.com
Tue Apr 19 20:36:59 EDT 2005
> >> Is it normal and intended that "0" is taken the same as the "null"
> >> when doing "r.mapcalc 'MASK=some_raster"?
> >
> > Yes.
> >
> >> It took me over an hour to guess my there where holes in my MASK.
> >> Shouldn't "0" be treated as a regular, valid value for MASK?
> >
> > Masks used to be zero/non-zero before support for a distinguished
> > NULL value was added in 5.0. The existing behaviour maintains
> > backwards compatibility.
>
> I see. But is backward compatibility so important here? IMHO all Grass
> oldtimers users got used to using NULL for no-data instead of ZERO,
> and newbies use NULL by default.
It's a true/false thing. 0 is false.
It could be better documented, but where?
> Also, all Grass commands I know use NULL for no-data.
A lot of the old raster modules still only have minimal floating point
support, let alone NULL support..
> And if they support ZERO it is an option. Shouldn't MASK follow this?
nope. Where would you put the option? g.gisenv? I think it would lead to
many disasters.
Hamish
More information about the grass-user
mailing list