masking an imagery or basemap layer doesn't appear to work

6395
11
Jump to solution
04-21-2017 05:01 AM
by Anonymous User
Not applicable

In ArcGIS Pro, there is the ability to mask layers using another polygon layer. I have tested that this can work using the steps outlined here:

http://pro.arcgis.com/en/pro-app/help/mapping/layer-properties/use-a-masking-layer.htm

I add two polygon layers, select the lower one in the draw order, go to the 'Appearance' tab, click on Masking, and tick the polygon layer above it. I click off this panel to activate, and the top layer masks out portions of the lower layer as expected.

However, if I then try it with an imagery or basemap layer, it doesn't work. I place the imagery layer at the bottom of the draw order, select it, go to the 'Appearance' tab, the 'Masking' option is there and it allows me to do exactly the same as above, but after ticking a polygon layer and clicking off it, nothing happens. The imagery layer is not masked at all.

Which leads on to a second follow-up question: my use case here was to try and clip/mask an imagery layer using a polygon layer. I actually want to do the reverse of the default here - I want to 'clip' the imagery, i.e. 'mask' everything that is *not* inside a polygon. I could achieve this by creating a 'doughnut' polygon where the masked portion is bigger than my layout, but that seems a little crude. Can anyone suggest another way?

Note that actually clipping (editing) the source image file is not an option.

Cheers,

-Paul

1 Solution

Accepted Solutions
KoryKramer
Esri Community Moderator

Paul Haakma‌ OK, I have the issues sorted out on our side.  The enhancement noted above has been converted into a bug: [BUG-000104788: Masking an imagery layer in ArcGIS Pro does not work] because the Masking functionality (in terms of the button being there when an image layer is selected, and the polygon layers populating in the Masking dropdown...) is all there.  It's all set up to work, its just that when a masking polygon is selected to mask an image layer, it doesn't work.  That is a bug, not an enhancement request.

For this one noted above: BUG-000104786: "Disable the masking option when an imagery is selected in the Table of contents".  NO!  We don't want to disable the masking option for imagery.  We want it to work!  Therefore, BUG-000104786 has been closed as a "duplicate" of BUG-000104788.

I hope this helps clear things up.  Thank you to you and jfpeagle-co-nz-esridist‌ for making sure that things are working well in Pro!

View solution in original post

11 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Paul,

If your imagery is not already in a mosaic dataset, I would recommend doing so. You can then apply raster functions to the mosaic dataset, one of them being the Clip function.  This will achieve what you are looking for.

by Anonymous User
Not applicable

Hi Jake

Thanks for the reply.

Yes that will achieve what I need in cases where a mosaic dataset is an option. I don't think it can be used in all situations, e.g. on a basemap or pre-rendered tile cache. I think it is also a static kind of function - by that I mean you run it and give it the parameters such as the layer to 'clip' by, and it creates a separate layer that is clipped, allowing you to turn off the original layer and just used the clipped layer. However, if you change/edit the original polygon that was used to clip it, you would need to delete the clipped layer and re-run the function. Not that this is a huge step, but I'm just highlighting that the 'masking' functionality is more user friendly in that any changes to the 'masking' polygon layer automatically updates the mask.

Unless I hear otherwise, I'm assuming that there is either a bug in Pro, in that the masking functionality doesn't work on imagery or basemap layers, or, if there is some practical reason that it doesn't work, then the UI mistakenly allows you to attempt to set it. I'm hoping it is a bug, and that it can be made to work. I'll look to raise it as a bug report with ESRI and see what happens.

Cheers,

-Paul

JohnPlunkett
Esri Contributor

I logged a case with Esri Support (Esri Case #01922833)

As a result I got three BUG/ENH requests

Please notice that the 'masking' functionality in Arcgis Pro does have some issues, and the below bug has been logged by another analyst.

BUG-000104786: "Disable the masking option when an imagery is selected in the Table of contents".
ENH-000104788: "Allow the use of imagery as masking layer in Arcgis Pro"
BUG-000085182: "Masking can not apply in ArcGIS Pro"

paul.haakma

 

KoryKramer
Esri Community Moderator

Paul Haakma‌ OK, I have the issues sorted out on our side.  The enhancement noted above has been converted into a bug: [BUG-000104788: Masking an imagery layer in ArcGIS Pro does not work] because the Masking functionality (in terms of the button being there when an image layer is selected, and the polygon layers populating in the Masking dropdown...) is all there.  It's all set up to work, its just that when a masking polygon is selected to mask an image layer, it doesn't work.  That is a bug, not an enhancement request.

For this one noted above: BUG-000104786: "Disable the masking option when an imagery is selected in the Table of contents".  NO!  We don't want to disable the masking option for imagery.  We want it to work!  Therefore, BUG-000104786 has been closed as a "duplicate" of BUG-000104788.

I hope this helps clear things up.  Thank you to you and jfpeagle-co-nz-esridist‌ for making sure that things are working well in Pro!

JohnPlunkett
Esri Contributor

Thanks Kory appreciate the help in getting it clarifed for everyone

alex_friant
Occasional Contributor II

It's May 2019 and I'm using Pro 2.3.2, but this bug persists. Any updates? Can we expect this to be fixed in 2.4?

Also, just a note, the masking layer has the same bug with Group Layers; you can apply a mask to a Layer Group, but the mask doesn't work on any of the layers inside that Group.

So perhaps this is related to basemap masking issue?

0 Kudos
KoryKramer
Esri Community Moderator

Hi Alex, that bug was looked at and was not reproducible in earlier versions.  So this may be a regression.  Regardless, we've brought it back in front of the development teams and they'll have a look.  Thanks for bringing this up.

jessemaps
Occasional Contributor

Is the masking feature supposed to work with Tiled Map Service layers such as World Hillshade? The Masking menu is available for this layer, yet the mask is not created when selecting the vector layer to mask with. It does work with local TIF files and Raster service layers such as TopoBathy3D, but not tiled basemap layers such as World Imagery or World Hillshade - is this supported? I'm using Pro v2.5.2.

0 Kudos
KoryKramer
Esri Community Moderator

Paul Haakma If I understand the requirement correctly, without using a mosaic dataset, you can use ‌a Clip raster function as seen below:

Here I have a TIFF layer and I also have a polygon layer that I've called Upper Poly:

Starting layers

In your use case, you say that you "want to 'clip' the imagery, i.e. 'mask' everything that is *not* inside a polygon. I could achieve this by creating a 'doughnut' polygon where the masked portion is bigger than my layout, but that seems a little crude."

From the Imagery tab, I chose Raster Functions.  This opens the Raster Functions pane, and I chose to Clip Clip function—ArcGIS Pro | ArcGIS Desktop .  Here is what my Clip Properties look like:

Outside clip properties

And the resulting layer (I increased the transparency to 80% because I wanted to leave the polygon layer on):

Outside clip result

Isn't that what you're looking to do?

0 Kudos