<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Grey out surrounding raster area? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/grey-out-surrounding-raster-area/m-p/1694851#M102680</link>
    <description>&lt;P&gt;Not quite what you asked, but we often need to do something similar, with a greyed out "reverse mask" around various watershed polygons. We have this function set up to turn any polygon / feature class into a cutout of itself, inside a circular buffer of whatever distance. If you pass it fields, you can use these reverse masks inside a Map Series too, to highlight specific regions as you loop through.&lt;/P&gt;&lt;P&gt;This would require that your graphics layer be a feature class.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
import os

def create_reverse_mask(input_fc, output_name, buffer_dist=10000, fields=[]):
    """
    Creates a 'cutout' mask from input polygons and adds it to the map 
    with 75% transparent grey symbology.
    
    input_fc    : Layer in TOC, or path to feature class
    output_name : Can be a full path, or just the name (in which case, save to scratchGDB)
    buffer_dist : Map Units. Set as big as needed for layout
    fields      : Define the fields to copy over from input (or leave empty)
    """
    # Prevent double-adding to TOC
    arcpy.env.addOutputsToMap = False
    
    # --- Path Handling ---
    if os.path.isabs(output_name):
        out_dir = os.path.dirname(output_name)
        out_base = os.path.basename(output_name)
        output_fc = output_name
    else:
        out_dir = arcpy.env.scratchGDB
        out_base = output_name
        output_fc = os.path.join(out_dir, out_base)

    # --- Initialize Feature Class ---
    if not arcpy.Exists(output_fc):
        sr = arcpy.Describe(input_fc).spatialReference
        arcpy.management.CreateFeatureclass(
            out_path=out_dir, 
            out_name=out_base, 
            geometry_type="POLYGON", 
            template=input_fc,
            spatial_reference=sr
        )
        print(f"Created: {output_fc}")

    # --- Processing ---
    cursor_fields = ["SHAPE@"] + fields
    with arcpy.da.InsertCursor(output_fc, cursor_fields) as i_cursor:
        with arcpy.da.SearchCursor(input_fc, cursor_fields) as s_cursor:
            for row in s_cursor:
                geom = row[0]
                if geom:
                    buff = geom.buffer(buffer_dist)
                    mask_geom = buff.difference(geom)
                    i_cursor.insertRow((mask_geom,) + row[1:])

    # --- Symbology (CIM) ---
    aprx = arcpy.mp.ArcGISProject("CURRENT")
    m = aprx.activeMap
    
    # Manually add the layer so we can grab the object
    new_lyr = m.addDataFromPath(output_fc)
    cim = new_lyr.getDefinition('V3')
    
    # 25% Opaque = 75% Transparent
    grey_fill = [128, 128, 128, 25] 
    
    # Iterate through symbol layers to update fill and disable stroke
    for sl in cim.renderer.symbol.symbol.symbolLayers:
        if isinstance(sl, arcpy.cim.CIMSolidFill):
            sl.color.values = grey_fill
        if isinstance(sl, arcpy.cim.CIMSolidStroke):
            sl.enable = False
            
    new_lyr.setDefinition(cim)
    print(f"Done. Layer '{out_base}' added.")

# Example Call:
#create_reverse_mask("lightofdaypolygon", "reversemask", 100000)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Apr 2026 17:11:03 GMT</pubDate>
    <dc:creator>BrennanSmith1</dc:creator>
    <dc:date>2026-04-07T17:11:03Z</dc:date>
    <item>
      <title>Grey out surrounding raster area?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/grey-out-surrounding-raster-area/m-p/1685239#M101977</link>
      <description>&lt;P&gt;In ArcGIS Pro, is there an easy way to &lt;STRONG&gt;grey out&lt;/STRONG&gt; the surrounding raster area around a "light of day" rectangle?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1771519845618.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/148623i844AB786F3E76751/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1771519845618.png" alt="Bud_0-1771519845618.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Idea:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/draw-attention-to-an-area-of-a-map-by-fading-the/idi-p/1685617/highlight/true" target="_self"&gt;Draw attention to an area of a map by fading the periphery&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Feb 2026 19:52:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/grey-out-surrounding-raster-area/m-p/1685239#M101977</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2026-02-20T19:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Grey out surrounding raster area</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/grey-out-surrounding-raster-area/m-p/1685318#M101984</link>
      <description>&lt;P&gt;The easiest approach would be to duplicate the raster layer, clip the top copy to your desired 'Light Of Day' rectangle, and then remove color bands from the bottom raster.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Copy raster (in contents pane &amp;gt; right click raster feature layer &amp;gt; copy).&lt;/LI&gt;&lt;LI&gt;Paste raster as new layer (in map &amp;gt; right click &amp;gt; paste).&lt;/LI&gt;&lt;LI&gt;With your original raster now as the bottom layer, grey it out with a grayscale raster function (Imagery tab &amp;gt; Raster Functions &amp;gt; Grayscale). Or you could just make it look faded out (Appearance tab &amp;gt; set transparency to something like 75%).&lt;/LI&gt;&lt;LI&gt;With your new raster now as the top layer, you want to clip it to a rectangle polygon to serve as your Light Of Day view (like cropping a photo to a predetermined size). To do this, create a new feature class (call it something like "LoD_clip") and draw your rectangle polygon directly with the feature class editing (or convert an existing rectangle area to a polygon). Use the clip tool (input feature: raster layer / clip to: LoD_clip) and it will output a new layer that is just your raster within the bounds of the clip's rectangle window.&lt;/LI&gt;&lt;LI&gt;Uncheck visibility of (or simply remove) the unclipped color raster, leaving you with the full-color clipped raster at the top, and the greyed-out raster at the bottom of the drawing order.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This should be the simplest way to get everything inside the Light Of Day rectangle to stay full color while everything outside appears greyed-out.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Feb 2026 19:14:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/grey-out-surrounding-raster-area/m-p/1685318#M101984</guid>
      <dc:creator>geo-theo</dc:creator>
      <dc:date>2026-02-19T19:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Grey out surrounding raster area?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/grey-out-surrounding-raster-area/m-p/1686777#M102089</link>
      <description>&lt;P&gt;The&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/raster-functions/clip-function.htm" target="_blank"&gt;Clip function—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;raster function in ArcGIS Pro could also be a solid workflow to consider too.&amp;nbsp; Use the Inside/Outside parameter to screen out the surrounding AOI/box.&amp;nbsp; Place the new result in-memory layer on top of the original then set a transparency for the original layer.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2026 22:36:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/grey-out-surrounding-raster-area/m-p/1686777#M102089</guid>
      <dc:creator>Robert_LeClair</dc:creator>
      <dc:date>2026-02-25T22:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Grey out surrounding raster area?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/grey-out-surrounding-raster-area/m-p/1694851#M102680</link>
      <description>&lt;P&gt;Not quite what you asked, but we often need to do something similar, with a greyed out "reverse mask" around various watershed polygons. We have this function set up to turn any polygon / feature class into a cutout of itself, inside a circular buffer of whatever distance. If you pass it fields, you can use these reverse masks inside a Map Series too, to highlight specific regions as you loop through.&lt;/P&gt;&lt;P&gt;This would require that your graphics layer be a feature class.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
import os

def create_reverse_mask(input_fc, output_name, buffer_dist=10000, fields=[]):
    """
    Creates a 'cutout' mask from input polygons and adds it to the map 
    with 75% transparent grey symbology.
    
    input_fc    : Layer in TOC, or path to feature class
    output_name : Can be a full path, or just the name (in which case, save to scratchGDB)
    buffer_dist : Map Units. Set as big as needed for layout
    fields      : Define the fields to copy over from input (or leave empty)
    """
    # Prevent double-adding to TOC
    arcpy.env.addOutputsToMap = False
    
    # --- Path Handling ---
    if os.path.isabs(output_name):
        out_dir = os.path.dirname(output_name)
        out_base = os.path.basename(output_name)
        output_fc = output_name
    else:
        out_dir = arcpy.env.scratchGDB
        out_base = output_name
        output_fc = os.path.join(out_dir, out_base)

    # --- Initialize Feature Class ---
    if not arcpy.Exists(output_fc):
        sr = arcpy.Describe(input_fc).spatialReference
        arcpy.management.CreateFeatureclass(
            out_path=out_dir, 
            out_name=out_base, 
            geometry_type="POLYGON", 
            template=input_fc,
            spatial_reference=sr
        )
        print(f"Created: {output_fc}")

    # --- Processing ---
    cursor_fields = ["SHAPE@"] + fields
    with arcpy.da.InsertCursor(output_fc, cursor_fields) as i_cursor:
        with arcpy.da.SearchCursor(input_fc, cursor_fields) as s_cursor:
            for row in s_cursor:
                geom = row[0]
                if geom:
                    buff = geom.buffer(buffer_dist)
                    mask_geom = buff.difference(geom)
                    i_cursor.insertRow((mask_geom,) + row[1:])

    # --- Symbology (CIM) ---
    aprx = arcpy.mp.ArcGISProject("CURRENT")
    m = aprx.activeMap
    
    # Manually add the layer so we can grab the object
    new_lyr = m.addDataFromPath(output_fc)
    cim = new_lyr.getDefinition('V3')
    
    # 25% Opaque = 75% Transparent
    grey_fill = [128, 128, 128, 25] 
    
    # Iterate through symbol layers to update fill and disable stroke
    for sl in cim.renderer.symbol.symbol.symbolLayers:
        if isinstance(sl, arcpy.cim.CIMSolidFill):
            sl.color.values = grey_fill
        if isinstance(sl, arcpy.cim.CIMSolidStroke):
            sl.enable = False
            
    new_lyr.setDefinition(cim)
    print(f"Done. Layer '{out_base}' added.")

# Example Call:
#create_reverse_mask("lightofdaypolygon", "reversemask", 100000)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2026 17:11:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/grey-out-surrounding-raster-area/m-p/1694851#M102680</guid>
      <dc:creator>BrennanSmith1</dc:creator>
      <dc:date>2026-04-07T17:11:03Z</dc:date>
    </item>
  </channel>
</rss>

