Many raster processing tools honour the environment setting Processing Extent, for which one of the options is Same as layer xyz where xyz is the layer. But this layer may have a selection on it and in reality this is the what I want the extent to be (e.g. a single selected country polygon from a world dataset).
Almost all geo-processing tools honour selections but why is this incredibly important environment setting ignoring a selection?
For example if you run extract by attribute and set the extent to be a polygon layer with a selection (e.g. a single country polygon from a world dataset) the resulting raster still has the extent of the original world raster.
Either tools need to be able to identify a dataset has a selection and the processing extent is set to that (preferred option as that behaviour is inline with all other tools) or may be the list needs an addition option, something like Same as Selection in layer xyz.
The current clunky and unnecessary work around is to export the selection to a separate dataset and use that as the extent. This adds an overhead to processing time for large models/scripts.