[GRASSLIST:3390] Re: s.surf.idw ques

Glynn Clements glynn.clements at virgin.net
Tue Mar 26 08:38:44 EST 2002


Kevin Slover wrote:

> 	I am starting to use s.surf.idw for some elevation and surge heights,
> just to get a "better" looking picture.  It seems to work much better
> than r.neighbor for creating a higher resolution image.  However, I have
> noticed that it takes null data and sets it equal to 0.  I have a mask
> set to "enclose" my data, since I am working with an irregular shaped
> data set.  
> 	Is there a way to set the 0 values to null??  I have used r.mapcalc,
> using the command newmap = if(oldmap == 0, null(), 0)...however, this
> gives me category map (0 and 1).  The other problem that I would run
> into is that I would like to retain values of 0 in my interpolated
> raster, which r.mapcalc would not be able to differentiate.  Any
> thoughts??

Try changing line 161 of src/sites/s.surf.idw/cmd/main.c from:

		dcell[col] = 0;
to:
		G_set_d_null_value(&dcell[col], 1);

> p.s.  A quick mail question, is this message coming in text or html
> format??!!  Thanks!!

Text.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-user mailing list