Closed philipbaileynar closed 5 years ago
This very well could be a problem with versioning, but it might also be a problem with applying symbology to vegetation rasters, which we've had problems with before.
In "BRATProject.py", from line 74 to line 86, the program calls the function makeInputLayers()
a bunch of times. I'd recommend commenting out those calls, and seeing if that helps.
This issue may rear its head later on in the Layer Package Generator, since there is a similar function called there, but we can deal with that when we get there.
Perhaps the code is trying to apply a classification from a layer file that is either expecting a certain attribute/field that doesn't exist or the number of bins in the dataset that was used to generate the layer file is different from the target dataset to which it is being applied. Similar problems arrive when applying stretch renderers to datasets that possess a different range.
I commented out the lines you referred to and it broken further on regarding DEM symbolization.
Then I skipped ahead to step 2 and the BRAT table and got overwhelmed at the prospect of having to browse to 20 inputs!
Hm... That's odd, we've never had a problem with applying symbology to DEMs. That does seem to imply a problem with your installation of ArcGIS, rather than a problem with the data. Unfortunately, since I can't replicate the bug on my computer, my ability to troubleshoot is limited.
A short term solution would be the following: in the makeLayer()
function in "BRATProject.py", you can replace the line
if symbology_layer:
arcpy.ApplySymbologyFromLayer_management(new_layer, symbology_layer)
with
if symbology_layer and isRaster:
arcpy.ApplySymbologyFromLayer_management(new_layer, symbology_layer)
That should be on line 217-218. Unfortunately, this was before we consolidated the makeLayer()
into a single function, so if you run into this problem again later on, you'll need to make that same change in that tool's copy of the makeLayer()
function.
Note that I do appear to have the specified layer file. Could it be an ArcGIS version issue?