The following code with a snap distance of 5 will fail with error code 2147483647. But if I remove the parameter. It will be working fine. Any ideas how to bypass this issue?
string sIputRaster = @C:\Support\PourPoints.tif;
string sFlowAccumRaster = @C:\Support\FlowAccumulation.tif;
string sRaterPath = @C:\Support\Snap.tif;
var parameters = Geoprocessing.MakeValueArray(sIputRaster, sFlowAccumRaster, 5, sRaterPath);
var cts = new CancellationTokenSource();
var results = await Geoprocessing.ExecuteToolAsync("SnapPourPoint_sa", parameters, null, cts.Token,
(eventName, o) =>
{
}, GPExecuteToolFlags.None);
if (results.IsFailed)
{
MessageBox.Show("Failed to create fill layer. Error " + results.ErrorCode);
return;
}