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;
}
Solved! Go to Solution.
Hi,
As I mentioned in ArcHydro tools question spatial analyst output parameter can migrate. Try specify snap distance after output raster path. In addition check validation messages sent from geoprocessing tool execute.
Hi,
As I mentioned in ArcHydro tools question spatial analyst output parameter can migrate. Try specify snap distance after output raster path. In addition check validation messages sent from geoprocessing tool execute.
Thanks a lot, @GKmieliauskas ! After I specified distance after the output raster path, it solved the problem!