Thanks for reply!
I don't have good news again :(
I've changed my code as you say. I've inited xy array only with non zero values:
Code:
int k = 0;
for ( int i = 0; i < nArrayHeight; i++ )
{
for ( int j = 0; j < nArrayWidth; j++ )
{
xy(k, 0) = i;
xy(k, 1) = j;
if ( m_ppArray[i][j].dValue != 0 )
{
xy(k, 2) = m_ppArray[i][j].dValue;
}
k++;
}
}
And as you recommended I've used IDWBuildModifiedShepardR() function:
Code:
int r = 3;
//idwbuildmodifiedshepard(xy, n, nx, d, nq, nw, z1);
idwbuildmodifiedshepardr(xy, n, nx, r, z1);
But now idwcalc returns the same values as inited points and all another values are equal to -6.2774385622041925e+066:
Code:
for( int i = 0; i < n; i++ )
{
x(0) = xy(i, 2);
double val = idwcalc(z1, x);
}
Where I did mistake again?
Thanks
Best regards, Aleksey.
P.S. In attached file whole code of method.