AnsweredAssumed Answered

Apply symbology to layer issues: output incorrect

Question asked by nschlagel on Jan 30, 2017

In effect, I am mapping wells from LIDAR (Attch: "Desired_map_outp"). I have processed the dems to show differences in depth, and overlay those over the dems. I am looking at a region with multiple sites, each with multiple tiles. Sites were mosaic'ed, now I want to give them a standard symbology so they can be more easily compared.

I applied symbology to multiple rasters using Apply Symbology to Layer (ASTL) in Arcpy; the intent is to apply a constant symbology (Attach: "Master Symbology") to many study site mosaics so they can be compared in figures with one common legend. Though the code ran and finished the output has two problems, one of which I may have fixed. The code applied colors and range correctly, but reversed the label relative to the range (Attach: "Issue_1") (the legend displays the max value on the true minimum - desired colors properly applied to min-max). To fix this I reversed the Range and Symbol columns in Symbology tab for the master layer and tested with the ASTL; I am doing depths of wells and initially reversed them to have 0 on top, and depth downwards; which seems to have caused the error).

 

The other error that I can't figure out how to fix is Range assignment over the entire collection. I made the master layer from the mosaic I believe has the min (0 relative to surface) and max depths (Atch: "Master Symbology"). However, when I applied this symbology with ASTL in arcpy, and with the tool itself to single layers, the result only covered the range of the target raster. That being, I want a min of 0 and max of -60, with 20 bins/classes and color gradient (for example) of yellow to blue (with orange, red, purple intermediates; with some manual changes to green), this is what the master is set to. Target rasters of -0.1 to -12.0 for example, will break into 20 classes/bins and apply the gradient but only at a range of -0.1 to -12.0 (Atch: "Target Layers"); I want it to force a range of 0 to -60, and only display its values on map of -0.1 to -12.

 

An alternative to forcing the full range on each receiving raster would be to end the reduce the number of bins/classes, and cut off the color gradient at its depth relative to the master so that they have the same relative depth classes and colors. This seems more difficult to automate over many rasters with different min-max values though. Automation is also a necessity, as I have ~80+ mosaics I'm currently trying to symbolize, and many more rasters of different locations that will be processed and need symbolized later.

I wasn't able to force a range wider than what a raster had, and hoped it could be achieved with the ASTL tool, but as above am having issues. Any help would be appreciated.

 


Cheers,
Nate


Code for record. Not sure if this is exactly what I did before as I was importing and grouping layers as well, but a close recreation of the symbolization I was trying to get.
>>> import arcpy
... mxd = arcpy.mapping.MapDocument("Current")
... df=arcpy.mapping.ListDataFrames(mxd)[0]
... depthLyrs=arcpy.mapping.ListLayers(mxd,"depth*",df)
... mastLyr=arcpy.mapping.ListLayers(mxd,"*symBeta",df)
...
>>> for lyr in depthLyrs:
...         arcpy.ApplySymbologyFromLayer_management(lyr, mastLyr)
... arcpy.RefreshTOC()
... arcpy.RefreshActiveView()

Outcomes