From looking at gdalgrid.cpp it seems that the smoothing parameter should be in units comparable to the coordinate system, not the raster grid.
// line 165
for( GUInt32 i = 0; i < nPoints; i++ )
{
double dfRX = padfX[i] - dfXPoint;
double dfRY = padfY[i] - dfYPoint;
const double dfR2 =
dfRX * dfRX + dfRY * dfRY + dfSmoothing * dfSmoothing; //<--- HERE
/* stuff */
// Is this point located inside the search ellipse?
if( dfRadius2 * dfRX * dfRX + dfRadius1 * dfRY * dfRY <= dfR12 )
{
// If the test point is close to the grid node, use the point
// value directly as a node value to avoid singularity.
if( dfR2 < 0.0000000000001 )
{
*pdfValue = padfZ[i];
return CE_None;
}
S
comes into the game through the distance formula :d = sqrt( dx2 + dy2 = S2)
. HenceS
should have th same units as thex
andy
used to compute the distance?