Skip to content

Commit

Permalink
Fixed historic vegetation symbology closes #145
Browse files Browse the repository at this point in the history
  • Loading branch information
banderson1618 committed Aug 31, 2018
1 parent 530d7ef commit 3dcdcd8
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions BRATProject.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ def main(projPath, ex_veg, hist_veg, network, DEM, landuse, valley, road, rr, ca
exVegEVTClassSymbology = os.path.join(symbologyFolder, "ExistingVeg_EVT_Class.lyr")
exVegClassNameSymbology = os.path.join(symbologyFolder, "ExistingVeg_ClassName.lyr")

histVegSuitabilitySymbology = os.path.join(symbologyFolder, "Historic_Veg_Suitability.lyr")
histRiparianSymbology = os.path.join(symbologyFolder, "Historic_Veg_Riparian.lyr")
histVegBPSSymbology = os.path.join(symbologyFolder, "HistoricVegType_BPS.lyr")
histVegBPSNameSymbology = os.path.join(symbologyFolder, "HistoricVegType_BPS_Name.lyr")
histVegGroupVeg = os.path.join(symbologyFolder, "BPS_GroupVeg.lyr")
histVegBPSNameSymbology = os.path.join(symbologyFolder, "BPS_NAME_symbology.lyr")
histVegVegCode = os.path.join(symbologyFolder, "BPS_VEG_Code.lyr")
histVegRiparian = os.path.join(symbologyFolder, "BPS_Riparian.lyr")

networkSymbology = os.path.join(symbologyFolder, "Network.lyr")
landuseSymbology = os.path.join(symbologyFolder, "Land_Use_Raster.lyr")
Expand All @@ -80,10 +80,10 @@ def main(projPath, ex_veg, hist_veg, network, DEM, landuse, valley, road, rr, ca

# add the historic veg inputs to project
histVegDestinations = copyMultiInputToFolder(histVegFolder, hist_veg, "Hist_Veg", isRaster=True)
makeInputLayers(histVegDestinations, "Historic Vegetation Suitability for Beaver Dam Building", symbologyLayer=histVegSuitabilitySymbology, isRaster=True, fileName="HistVegSuitability")
makeInputLayers(histVegDestinations, "Historic Riparian", symbologyLayer=histRiparianSymbology, isRaster=True, checkField="GROUPVEG")
makeInputLayers(histVegDestinations, "Veg Type - BPS Type", symbologyLayer=histVegBPSSymbology, isRaster=True, checkField="GROUPVEG")
# makeInputLayers(histVegDestinations, "Veg Type - BPS Class Name", symbologyLayer=histVegBPSNameSymbology, isRaster=True)
makeInputLayers(histVegDestinations, "Vegetation Suitability", symbologyLayer=histVegVegCode, isRaster=True)
makeInputLayers(histVegDestinations, "Veg Type - Veg Group", symbologyLayer=histVegGroupVeg, isRaster=True)
makeInputLayers(histVegDestinations, "Veg Type - BPS Name", symbologyLayer=histVegBPSNameSymbology, isRaster=True)
makeInputLayers(histVegDestinations, "Riparian", symbologyLayer=histVegRiparian, isRaster=True, checkField="Riparian")


# add the network inputs to project
Expand Down
Binary file added BRATSymbology/BPS_GroupVeg.lyr
Binary file not shown.
Binary file added BRATSymbology/BPS_NAME_symbology.lyr
Binary file not shown.
Binary file added BRATSymbology/BPS_Riparian.lyr
Binary file not shown.
Binary file added BRATSymbology/BPS_VEG_Code.lyr
Binary file not shown.
Binary file removed BRATSymbology/HistoricVegType_BPS.lyr
Binary file not shown.
Binary file removed BRATSymbology/HistoricVegType_BPS_Name.lyr
Binary file not shown.
Binary file removed BRATSymbology/Historic_Veg_Riparian.lyr
Binary file not shown.
Binary file removed BRATSymbology/Historic_Veg_Suitability.lyr
Binary file not shown.
16 changes: 8 additions & 8 deletions Layer_Package_Generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ def checkInputs(inputsFolder, symbologyFolder):
exVegEVTClassSymbology = os.path.join(symbologyFolder, "ExistingVeg_EVT_Class.lyr")
exVegClassNameSymbology = os.path.join(symbologyFolder, "ExistingVeg_ClassName.lyr")

histVegSuitabilitySymbology = os.path.join(symbologyFolder, "Historic_Veg_Suitability.lyr")
histRiparianSymbology = os.path.join(symbologyFolder, "Historic_Veg_Riparian.lyr")
histVegBPSSymbology = os.path.join(symbologyFolder, "HistoricVegType_BPS.lyr")
histVegBPSNameSymbology = os.path.join(symbologyFolder, "HistoricVegType_BPS_Name.lyr")
histVegGroupVeg = os.path.join(symbologyFolder, "BPS_GroupVeg.lyr")
histVegBPSNameSymbology = os.path.join(symbologyFolder, "BPS_NAME_symbology.lyr")
histVegVegCode = os.path.join(symbologyFolder, "BPS_VEG_Code.lyr")
histVegRiparian = os.path.join(symbologyFolder, "BPS_Riparian.lyr")

networkSymbology = os.path.join(symbologyFolder, "Network.lyr")
landuseSymbology = os.path.join(symbologyFolder, "Land_Use_Raster.lyr")
Expand All @@ -252,10 +252,10 @@ def checkInputs(inputsFolder, symbologyFolder):
makeInputLayers(exVegDestinations, "Veg Type - ClassName", symbologyLayer=exVegClassNameSymbology, isRaster=True)

histVegDestinations = findDestinations(histVegFolder)
makeInputLayers(histVegDestinations, "Historic Vegetation Suitability for Beaver Dam Building", symbologyLayer=histVegSuitabilitySymbology, isRaster=True, fileName="HistVegSuitability")
makeInputLayers(histVegDestinations, "Historic Riparian", symbologyLayer=histRiparianSymbology, isRaster=True, checkField="Riparian")
makeInputLayers(histVegDestinations, "Veg Type - BPS", symbologyLayer=histVegBPSSymbology, isRaster=True)
#makeInputLayers(histVegDestinations, "Veg Type - BPS Name", symbologyLayer=histVegBPSNameSymbology, isRaster=True)
makeInputLayers(histVegDestinations, "Vegetation Suitability", symbologyLayer=histVegVegCode, isRaster=True)
makeInputLayers(histVegDestinations, "Veg Type - Veg Group", symbologyLayer=histVegGroupVeg, isRaster=True)
makeInputLayers(histVegDestinations, "Veg Type - BPS Name", symbologyLayer=histVegBPSNameSymbology, isRaster=True)
makeInputLayers(histVegDestinations, "Riparian", symbologyLayer=histVegRiparian, isRaster=True, checkField="Riparian")

networkDestinations = findDestinations(networkFolder)
makeInputLayers(networkDestinations, "Network", symbologyLayer=networkSymbology, isRaster=False)
Expand Down

2 comments on commit 3dcdcd8

@bangen
Copy link
Contributor

@bangen bangen commented on 3dcdcd8 Aug 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@banderson1618 Did you or Mic test this per my last comment on #145 before closing?

@banderson1618
Copy link
Contributor Author

@banderson1618 banderson1618 commented on 3dcdcd8 Aug 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bangen it will fail to apply symbology to the layer if the raster doesn't have the right field. The tool won't crash. There's not a lot we can do for raster that don't have the right symbology set up, unfortunately.

Please sign in to comment.