On Wed, 20 Feb 2008, Ivan Shmakov wrote:

Glynn Clements <[EMAIL PROTECTED]> writes:

> For this feature to be of real use, you need to allow MASK_OVERRIDE
> to be used to disable reading a mask altogether. E.g. if
> MASK_OVERRIDE is defined but empty, no mask should be used rather
> than falling back to MASK. This would allow the GUI to operate
> without a mask even when MASK has been created via the command line.

        The code doesn't ever fall back to `MASK' if `MASK_OVERRIDE' is
        defined.  If `MASK_OVERRIDE' doesn't point to a valid raster
        (e. g., if it's an empty string), the mask is ignored.

        However, I doubt if it's a reasonable behaviour.  It seems to be
        usual in the Unix world to ignore the environment variable's
        value if it's an empty string.  Using a non-existing raster
        (say, `.') is probably a better idea.

On Windows, an environment variable is unset by setting it to an empty string. There seems to be no difference between the two. So I don't think we could rely on the behaviour caused by MASK_OVERRIDE being an empty string. OTOH setting it to some garbage value seems a little unelegant, but as long as it's not a valid raster name there should be no problem I suppose.

Paul

_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to