Hi Vivien,
You must set output path of your results. I do not know which exactly geoprocessing tool you are going to use, but I will show you on Spatial Analyst Raster Calculator example:
private static bool ExecuteRasterCalculator(string sExpression, string sOutRaster, Envelope pExtent, string sWorkspace, string sMaskRaster)
{
try
{
var gpresult1 = Task.Run(() =>
{
var parameters = Geoprocessing.MakeValueArray(sExpression, sOutRaster);
IReadOnlyList<KeyValuePair<string, string>> environments;
environments = Geoprocessing.MakeEnvironmentArray(mask: sMaskRaster, extent: pExtent, workspace: sWorkspace);
return Geoprocessing.ExecuteToolAsync("RasterCalculator_sa", parameters, environments,
CancelableProgressor.None, GPExecuteToolFlags.AddToHistory);
});
return !gpresult1.Result.IsFailed;
}
catch (Exception ex)
{
throw;
}
}
Result raster will be stored on path sOutRaster. Geoprocessing.MakeValueArray parameters count and sequence depends on geoprocessing tool. For order and parameters look into your tool description