Hi.
I'm writing a tool for ArcGIS Pro 3.1 that is supposed to clip a rectangle from a raster layer using the management.Clip geoprocessing tool.
var parameters = Geoprocessing.MakeValueArray(layer, envelope, output);
var result = Geoprocessing.ExecuteToolAsync("management.Clip", parameters, null, null, null, GPExecuteToolFlags.None);The layer is a RasterLayer. The envelope is a geometry.Extent from the OnSketchCompleteAsync in a custom selection tool. The output is a .jp2 or .tif output file.
What ends up in the output is a complete copy of the original raster layer instead of the contents of the clipped rectangle. What am I doing wrong?