Enable use of selection on a mask layer for an environment setting

2573
11
11-18-2021 05:16 AM
Status: Implemented
Labels (1)
DuncanHornby
MVP Notable Contributor

Many spatial analyst tools use the environment setting Mask which is a powerful way to limit a tools processing  to a specific area. A mask can be a raster but it can also be features (vector data). I often use vector data as a mask, e.g. island polygons to say mask a raster landcover dataset I wish to process.

Just about every tool that takes a vector dataset as input will honour selections. But the Mask environment setting ignores selections, it always uses the whole dataset.

My idea is to enable the mask environment setting to honour selections on a vector layer if it is used as a mask for a raster processing tool (e.g. the CON() tool). If the datasource of a layer is used instead, then I expect all features to participate in the masking.

So in my use case scenario I have a global vector dataset of islands, I've selected a subset and I want only those to be considered as a mask, currently the selection is ignored and all polygons are considered a mask.

11 Comments
KoryKramer

Hi @DuncanHornby I just wanted to check to make sure that you're using the layer with the selection rather than browsing to its datasource to set the Mask environment setting.

I haven't tested this, but if the layer's selection isn't being honored, have you tried Make Layer From Selected Features and using that layer for the mask?

KoryKramer_0-1637242420142.png

 

DuncanHornby

Yeah definitely using a layer rather than a datasource. I had not considered making a temporary layer based on the selection so I tried what you suggested. But that too is ignored and the selection layer is treated as if it was the original layer without a selection. So that seems like a bug to me!

But ideally and in keeping with the behaviour of all other tools I would like to see the mask honour selections and I don't have to go through temporary layers.

I appreciate that this will be a major redevelopment project that affects hundreds of tools, so I'm half expecting the obvious reply...mañana.

KoryKramer
Status changed to: Under Consideration

Hi @DuncanHornby the dev team has taken this up and the general consensus is that, as you suspected, it is more of a bug than an idea.  We'll let that slide, and continue to keep the status updated through this thread.  Thanks for bringing it to our attention.

My final thought (and you probably already got there given our back and forth yesterday) would be to export the selection to a new memory layer rather than using the 'make layer from selected features'.  Would that work?  Just trying to think of ways that don't require actually writing a new fc to disk for you to do your analysis.  We'll update the status when we have a better idea of a release.

Thanks again.

DuncanHornby

@KoryKramer Just explored your idea of exporting selected features into an in memory workspace and that seemed to work as a work around. Thanks! Look forward to hearing if mask layers will honour selections in some future version of Pro.

ElizabethGraham

Hi @DuncanHornby,

I am a product engineer on the development team responsible for the Mask environment. I want to update you and let you know that we are actively working on honoring selections on Masks. Thank you for reporting this idea/bug. 

DuncanHornby

Hi Elizabeth,

I only need to say one word, awesome!

Duncan

KoryKramer
Status changed to: Implemented

@DuncanHornby please update to Patch 2 for ArcGIS Pro 2.9. It looks like this bug should be addressed there.

Thank you!

KoryKramer
Status changed to: Under Consideration

Sorry for jumping the gun on circling back here, Duncan. It looks like there is a partial fix for this in 2.9.2 but there is remaining work to be done. We'll keep everyone posted here when this is completely resolved.

Thank you, and sorry for the false alarm...

KoryKramer
Status changed to: In Product Plan
 
KoryKramer
Status changed to: Implemented

This should be fully resolved in ArcGIS Pro 3.0.