I need to convert floating point rasters to integers. Seemed logical to use the Int (Spatial Analyst) function.
Turns out this sits around for 2 or 3 minutes (at 0% completed) before it even does the processing.
When I do the same thing with a raster calculator expression, it takes 7 seconds.
Same behavior whether I call this via my add-in or just executing geoprocessing tools.
Any clue why Int takes forever?
Interesting. Perhaps it might have something to do with the optional Environment parameters that the Int tools supports
Int (Spatial Analyst)—ArcGIS Pro | Documentation
check to make sure that the cell size, extent etc is the same as the input float raster.
I also notice that the output raster type seems to be different in the examples that you provided (unless the first output name is truncated.)
Do the comparison with the same output type if this is not the case
I did try with different output types. That makes no difference. Good idea though.
Environment settings were identical for both methods, too.
are the raster attribute tables the same?
yes, output attribute tables, as well as all dataset properties, are exactly the same for the 2 outputs.
a good case to report to Tech Support
It would be interesting if this is limited to Int or other SA tools and why the raster calculator circumvents what is slowing down things.
RasterToNumPyArray
use numpy to process values
NumPyArrayToRaster
is another option since they don't use arctoolbox just what is in arcpy/arcgisscripting