-
Notifications
You must be signed in to change notification settings - Fork 0
CE QUAL W2 Geometry Preprocessor Tool Scripts (DRAFT)
jrutyna edited this page Aug 25, 2021
·
7 revisions
A draft version of the CE-QUAL-W2 Geometry Preprocessor Tool scripts is provided here for testing purposes. Please note that in these draft scripts, some hardcoded file paths to inputs files will need to be changed so that scripts can function as intended.
The link below is a zip file containing the four draft QGIS python scripts and example input files for testing. Please save and unzip this zip file to a local drive/network location: DRAFT CE-QUAL-W2 Geometry Preprocessor Tool Scripts
Contents of Zip File:
- create_polygons.py
- split_polygon.py
- convex_check.py
- centerline_check.py
- NapaRiver_CL_WGS84webMrctr_E.shp
- TEMP_SegmentsB.shp
- TEMP_TransectsB.shp
The following instructions will execute the DRAFT CE-QUAL-W2 geometry preprocessor tool scripts:
- Open QGIS
- Open the “Python Console” in QGIS
- Click the “Show Editor” button in the “Python Console”
- Click the “Open Script…” button in the “Python Console Editor”
- Navigate and select the “create_polygons.py” script
- This script is currently hardcoded with segment count, file path/name for centerline shape file, and transect width. Please modify for your application.
- Once the script is open and currently active, click the “Run Script” button in the “Python Console Editor”
- The script will create two QGIS temporary layers: “Segments” and “Transects”
- The script "split_polygon.py" can be executed after the "create_polygons.py" script has run. Currently, the "split_polygon.py" script can only split one polygon at a time. Please pick one polygon to split with the "Select Feature" tool within QGIS before running the "split_polygon.py" script.
- The scripts “convex_check.py” and “centerline_check.py” can be executed in the same way as the previous scripts, but hardcoded file path names will need to be changed.
- To visualize the additional fields in the convex and centerline checking scripts, please right-click on the last layer the script generated, which is "Calculated", and select "Properties..."
- Click "Symbology"
- From the pull-down list at the top of the "Symbology" window, select "Categorized"
- From the "Value" pull-down list, select "Is_Convex" or "Is_CL_In", based on which tool was run
- Click "Classify" and change "Symbol" color above, if desired
- Click "OK"