[GRASS5] RST programs and MASK
paul-grass at stjohnspoint.co.uk
Sun Apr 27 18:28:11 EDT 2003
On Thu, 27 Mar 2003, Helena Mitasova wrote:
> maskmap is there for the users (and mine) convenience for the cases
> where I have a MASK set but my point data cover only a portion of the
> within that mask, so I can mask the result without changing the MASK.
> s.surf.rst should honor the MASK but I am not sure that it really does.
So if a cell is masked by either the GRASS MASK or the raster file
specified with the 'maskmap=' option it should be masked in the output
I have committed a change to CVS so that this is how the 3 RST programs
(s.surf.rst, v.surf.rst and r.resamp.rst) behave. It involved a change to
the IL_create_bitmask() function so that it now also checks for the
current MASK as well as the maskmap option, and a fix to the way this
function is called from the user programs. I changed it so it returns a
pointer to the bitmask; this got round a bit of awkwardness with passing a
pointer to the bitmask to it when it really should be this function
deciding if it is going to create a bitmask or just return null.
It works fine on Linux but an earlier problem is still there on Irix:
instead of the masked cells having a value of null, when I query them with
d.what.rast I get something like
aster in PERMANENT, quant (2147483647)
aster in PERMANENT, actual (nan0x7ffffe00)
instead of null. I think it might be something to do with a mixture of
FCELL and DCELL references in the program, but it looks a bit complicated
and I didn't get anywhere with it.
A slightly related query:
I've managed to obtain a copy of 'Open Source GIS: A GRASS GIS Approach'
and it is a really useful and interesting book. I noticed a mention to the
s.surf.rstcv cross-validation module, and wonder if/when it is going to
appear in the GRASS source?
More information about the grass-dev