Saturday 25 August 2018

arcgis desktop - How to vary the transparency of symbols within a single layer in ArcMap?


I have a polygon layer which I am drawing in ArcMap using a graduated color symbology:


enter image description here


Is it possible to vary the transparency between the classes, so that the transparency tapers off with the color ramp?


For example, draw the first range (0.175 - 0.225) with no transparency, but the last range (0.45 - 0.52) with 50% transparency.


This is the effect I am trying to mimic, taken from Google Earth as a polygon KML:


enter image description here


One workaround could be to create a separate layer for each class using a definition query, vary each layer's transparency, then group them together. Is there a less cumbersome approach?




Answer



The only way I know of to do this without creating many feature layers (one for each level of transparency) is to create a raster with an alpha channel.


Here is one possible workflow you can try:



  1. Use Polygon to Raster to convert your polygon features to a raster.

  2. Reclassify the data as desired (using 8-bit unsigned integer with values from 0-255 works best).

  3. Use Composite Bands to make a multi-band raster (can use the same input for multiple bands).


  4. Specify the band to use as an alpha channel:




    Rendering alpha bands


    An alpha band acts as a transparency mask, providing a transparency value for each pixel. An alpha band can be toggled on or off for multiple-band raster datasets rendered with the RGB Composite renderer.


    If you want to toggle the Alpha channel on or off, you will need to check the appropriate check box to turn it on or uncheck it to turn it off within the Symbology tab of the raster layer Properties dialog box.


    Steps:



    1. Right-click the raster layer you want to change the alpha band for in the table of contents and click Properties.

    2. Click the Symbology tab.

    3. Click RGB Composite.

    4. To turn the alpha band on, check the Alpha channel box and choose a band to use. To turn the alpha band off, uncheck the box for the Alpha channel.

    5. Click OK.




    Sources: 1 2




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...