Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BRAT Version 3.1.00 is here! #294

Closed
mhallerud opened this issue Aug 10, 2019 · 30 comments
Closed

BRAT Version 3.1.00 is here! #294

mhallerud opened this issue Aug 10, 2019 · 30 comments
Labels
discussion Discussion among BRAT developers and power users.

Comments

@mhallerud
Copy link
Contributor

@wally-mac @bangen @joewheaton

@tyler1218hatch and I have finally finished up doing a complete overhaul of BRAT and I just released the new version as 3.1.00. This issue is just to document the major improvements that are contained in this release. In order of the tools, these include:

  • BRAT Project Builder: Incorporating beaver dams and land ownership in BRAT folder structure and adding layers.
  • BRAT Table: Adding the perennial stream network and incorporating it in finding clusters, identifying points of diversion, calculating distance to points of diversion and including this distance in the overall distance to nearest infrastructure, identifying land ownership by reach, and calculating distance to private land. Layers have also been made for all of the above.
  • BRAT Braid Handler: Using the stream name to identify main channels.
  • iHyd: Adding the hydrological equations as inputs, rather than directing users to edit the code.
  • Vegetation Capacity FIS: Extending the upper limit of the capacity model.
  • Combined Capacity FIS: Extending the upper limit of the capacity model.
  • Conservation Restoration: Incorporating the TNC strategies map as an optional output, renaming of categories for accuracy, and identifying any canals as "major risk".
  • Data Capture Validation: Adding drainage area threshold as optional input to limit snapping of dams far from the main channel, adding "Snapped" field to dams to identify which were used in the validation. Calculating and making layers comparing existing vs. historic capacity, comparing BRAT estimated vs. surveyed dam counts, and % of estimated capacity occupied by dams. Parsing the "Easiest - Low-hanging fruit" category into conservation and restoration categories based on the proportion of capacity occupied.
  • Layer Package Generator: Adding clipping network functionality, including all new layers, and modifying the ordering so dam density is always shown before dam count in the capacity layers.
  • Collect Summary Reports: Completely new.
  • BRAT toolbox: Descriptions added to user interface, default values for output names.
  • Batch scripts: Cleaned up versions of all batch scripts are provided in the Supporting Tools/Batch Scripts folder.

Lastly, we have improved the website documentation to reflect these changes and updated all in-code documentation as fit, including @tyler1218hatch making all BRAT scripts PEP8 compliant.

@tyler1218hatch Am I missing anything?

@mhallerud mhallerud added the discussion Discussion among BRAT developers and power users. label Aug 10, 2019
@mhallerud
Copy link
Contributor Author

I should note also, @tyler1218hatch and I have been testing the code all week on three different computers. I did a final run-through this morning on 2 computers, varying inputs across 4 watersheds. The only known problem is a geometry M-aware problem which only Tyler runs into once in awhile (see #293). I ran into a few minor bugs (i.e., typos, layers not being made, etc.), I corrected them and reran to test any changes. Long story short, the release has been tested and is fairly stable.

@tyler1218hatch
Copy link
Contributor

Nope, I think that's everything! Let me know if you have any questions!

@ctobalsk
Copy link

Very excited for this stable version! I just downloaded it, and unfortunately the two Arc toolboxes (BDWS.pyt and BRAT.pyt) look broken (see jpeg below). I'm working with ArcGIS 10.6. Any suggestions? I didn't have this problem with 3.019. Thanks!
Claudine
broken

@mhallerud
Copy link
Contributor Author

@ctobalsk I can look into it further and troubleshoot. What version of ArcGIS are you using? Also, can you right-click on the BRAT toolbox, click check syntax, and then load a screenshot of the error it’s throwing?

@ctobalsk
Copy link

Thanks! I'm using 10.6. Here's the error I get:

Traceback (most recent call last):
File "", line 14, in
File "H:\BRAT\pyBRAT-3.1.00\Collect_Summary_Products.py", line 15, in
import xlsxwriter
ImportError: No module named xlsxwriter

@mhallerud
Copy link
Contributor Author

@ctobalsk So the problem is that you're missing the xlsxwriter dependency, which is new and necessary for the "Collect Summary Products" tool. See the BRAT website and follow instructions for setting up scikit-fuzzy, except the script will be pip install xlsxwriter. Let me know if BRAT works then or if you run into any further issues!

@ctobalsk
Copy link

Thanks Margaret, I'll work on this and keep you posted!

@ctobalsk
Copy link

Yep that did the trick, thanks for the help!

@ctobalsk
Copy link

All right, next problem - I already had it when running version 3.019 (but not for older versions such as 2.0): the BRAT Project Builder script bonks when trying to generate slope and hillshade, if I hashtag out the corresponding script lines it runs fine, otherwise I get this (see below). Something not right with my DEM format?

Traceback (most recent call last):
File "", line 197, in execute
File "H:\BRAT\pyBRAT-3.1.00\BRATProject.py", line 163, in main
raise arcpy.ExecuteError(err)
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000859: The required parameter Input raster is empty, or is not the type of Composite Geodataset.
Failed to execute (HillShade).

Traceback (most recent call last):
File "", line 197, in execute
File "H:\BRAT\pyBRAT-3.1.00\BRATProject.py", line 163, in main
raise arcpy.ExecuteError(err)
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000859: The required parameter Input raster is empty, or is not the type of Composite Geodataset.
ERROR 000859: The required parameter Output raster is empty, or is not the type of Raster Dataset.
Failed to execute (Slope).

@ctobalsk
Copy link

Huh. I already posted about this previously... But it would be nice to know why the script isn't running as is.
#200

@mhallerud
Copy link
Contributor Author

@ctobalsk I was unaware of this issue and have not run into the above error before, but can look into it more. Are you just loading a single *.tif file for you DEM?

@ctobalsk
Copy link

I'm using .img grids as inputs, that works fine except for the DEM for some reason. I'll try using a tif file and see if that works better.

@ctobalsk
Copy link

Ha! Looks like that did the trick. Thanks for the help Margaret!

@ctobalsk
Copy link

ctobalsk commented Sep 9, 2019

Ok, I have one last (hopefully) issue -- I can't seem to be able to run the layer Package Generator. Everything runs fine for a while, I can see the layers getting displayed at very fast speed (and with the proper color legend) in ArcGIS, then suddenly the whole thing crashes and I get this error message:

Executing: Layer_Package_Generator_tool H:\BRAT\HUC4_BRAT\Arrow_Creek\Outputs\Output_01 # #
Start Time: Mon Sep 9 16:11:00 2019
Running script Layer_Package_Generator_tool...
Recreating missing layers (if possible)...
Assembling Layer Package...
Saving Layer Package...

Traceback (most recent call last):
File "", line 848, in execute
File "H:\BRAT\pyBRAT-3.1.00\Layer_Package_Generator.py", line 63, in main
inputs_folder, symbology_folder, layer_package_name, clipping_network)
File "H:\BRAT\pyBRAT-3.1.00\Layer_Package_Generator.py", line 664, in make_layer_package
arcpy.PackageLayer_management(output_layer, layer_package)
File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\management.py", line 8658, in PackageLayer
raise e
ExecuteError: ERROR 999999: Error executing function.
Missing raster band wavelength properties.
Missing raster band wavelength properties.
Missing raster band wavelength properties.
Failed to execute (PackageLayer).

Failed to execute (Layer_Package_Generator_tool).
Failed at Mon Sep 9 16:11:24 2019 (Elapsed Time: 24.52 seconds)

@wally-mac
Copy link
Contributor

wally-mac commented Sep 9, 2019 via email

@ctobalsk
Copy link

Up - Any suggestions as to why I'm getting these wavelength errors that prevent the generation of the layer package?

@wally-mac
Copy link
Contributor

wally-mac commented Sep 24, 2019 via email

@ctobalsk
Copy link

Sounds good Wally, keep me in the loop!

Claudine

@KennyGIS
Copy link

KennyGIS commented Nov 10, 2019

First time user of BRAT here. I have gotten to Step 2. BRAT Table and started the process, but it is taking a very long time to process. It has been about 12 hrs...I was just wondering how long this step generally takes to process everything? It has not thrown any errors in the process, but it has been on "Calculating drainage area..." in the processing details for a while now? Any ideas on if this is normal or how to speed it up?

***Update
So I restarted the process and it moved passed drainage area bu then failed to create the layers.(see attached image). Any help you could offer would be appreciated!
image

@mhallerud
Copy link
Contributor Author

Hi @KennyGIS, the "could not find relative path" error is usually thrown when the directory structure created in the BRAT Project tool is modified, or the inputs are not from within the project folder. If the project folder was modified, the easiest thing to do is rerun the BRAT project tool and create a new project folder. Then when running the BRAT table, double check that all your input files are nested within the project folder structure created by the BRAT project tool. For a single HUC8 watershed, the BRAT table typically takes between 20-30 minutes on a normal computer.

@KennyGIS
Copy link

That was it! Thank you for the help! I got it running today!

@mhallerud
Copy link
Contributor Author

@KennyGIS Glad to hear it! Feel free to open an issue/comment if you have other questions. Just be sure to tag my username so that I get a notification and can get back to you sooner.

@KennyGIS
Copy link

KennyGIS commented Nov 19, 2019

@mhallerud So, I was able to run the model for one watershed, however I am now having some other issues when I try to run it on another watershed. It is in the Comb_FIS step when trying to run the combined capacity model. I have re-run the entire model from the beginning a few times and I have gotten the same error. Any ideas? I know a column is missing, but I don't know why.
image

@mhallerud
Copy link
Contributor Author

@KennyGIS It looks like you're missing one of the iVeg_Hpe fields in particular. You can try re-running the Veg_FIS tool and if that doesn't work, maybe send me a screenshot or attachment of your BRAT table DBF file and I can look into it further.

@joewheaton
Copy link
Contributor

This was an announcement (prior to discussion boards) and turned into a tech support ticket. Resolved.

@julietsmith17
Copy link

Hi @mhallerud I'm late to the party but I'm hoping you can still help me. I'm using pyBRAT for a graduate project and I'm having trouble getting both toolboxes to open in ArcGIS. I'm using version 10.8.1 and the BRAT.pyt toolbox is opening but the BDWS.pyt toolbox is not.

The BDWS.pyt error message is :
Traceback (most recent call last):
File "", line 3, in
File "F:\BRAT\pyBRAT_toolbox_v3\pyBRAT-3.1.00 (1)\pyBRAT-3.1.00\bdwsRun.py", line 1, in
from bdws import BDLoG, BDSWEA
File "F:\BRAT\pyBRAT_toolbox_v3\pyBRAT-3.1.00 (1)\pyBRAT-3.1.00\bdws.py", line 1, in
from osgeo import gdal, ogr
ImportError: No module named osgeo

Any ideas?
Thanks for your time!

BRATtoolboxes

@mhallerud
Copy link
Contributor Author

Hi @julietsmith17, I no longer work with this lab (I moved onto graduate school myself), however I was never able to get the BDWS toolbox up and running. Unfortunately, it would take a bit of work to get it up again and compatible with the newest ArcGIS Desktop version. This should not interfere with pyBRAT though. If your project requires BDWS, I would reach out to [email protected]. It looks like they are now maintaining BRAT.

@julietsmith17
Copy link

julietsmith17 commented Feb 27, 2023 via email

@mhallerud
Copy link
Contributor Author

mhallerud commented Feb 27, 2023 via email

@julietsmith17
Copy link

Thank you @mhallerud that's amazing, I really appreciate it and I'm so excited to start using it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion among BRAT developers and power users.
Projects
None yet
Development

No branches or pull requests

7 participants