'bugfix' for s.surf.idw

Job Spijker spijker at geo.uu.nl
Fri Oct 29 04:35:55 EDT 1999


On Thu, 28 Oct 1999, Markus Neteler wrote:

> > I changed the file main.c in the src/sites/s.surf.idw/cmd directory which
> > now does a correct (although I didn't do any validation yet) interpolation
> > and and  the result is a raster map consisting of floating numbers as
> > z-values instead of integers.
> 
> Hi Job,
> 
> thank you for your update! I implemented it and it is working so far.
> (BTW: I have a bugfix for s.in.ascii memory overflow from Bill Brown
> received yesterday).
> 
> But I found in s.surf.idw that the values are .5 lower than the original
> for every cell value:

I checked it and it seems that there is a mistake in the calculation of
the cells. If I remove the '+0.5' from the formule 'cell=sum1/sum2 + 0.5'
(somewhere around line 196 in main.c) then it gives the correct results
for my data. I think that the '+0.5 was used tho round integers in a
correct way, but because it works with floats now it isn't necessary
anymore.

Grtz, Job

----------------------------------------------------------------------
Job Spijker                                       
Faculty of Earth Sciences/ Department of Geochemistry
Utrecht University, The Netherlands
Budapestlaan 4 3584 CD Utrecht                    
T: 030-253 3264 F: 030-253 5030       
----------------------------------------------------------------------



More information about the grass-user mailing list