Tutorial M01 Define Active Area QGIS GPKG: Difference between revisions

Content deleted Content added
No edit summary
 
(54 intermediate revisions by 3 users not shown)
Line 1:
= Introduction =
QGIS is used to set an active model area.<br>
 
<br>
= Method =
Use the TUFLOW plugin to create the code polygon layer:
Line 7:
<li>Click on the ‘Import Empty File’ symbol from the TUFLOW Plugin toolbar. <br>
<br>
[[File:M01 ImportEmptyImportEmpty_a.pngPNG]]<br>
<br>
<li>This opens the Dialog shown below. The TUFLOW plugin accesses the 'Empty Directory' created when the project was configured and provides a list of files to choose from. It appends the 'Empty Type' to the beginning of the 'RUN ID' and the 'Geometry Type' letter to the end. This becomes the name of the file. Make the following selections:
Line 13:
:*In the Run ID box write: 'M01_001'.
:*Tick the 'Regions' Geometry Type.
:*In the Spatial Database Options, select 'All to one'. Navigate to the '''Module_01/TUFLOW/model/gis''' folder and save the GeoPackage database as '''M01_001.gpkg'''.
:*Click 'OK'.
<li>A layer called '''2d_code_M01_001_R''' in a region format with the relevant TUFLOW attributes is created. The TUFLOW plugin automatically createcreates a GeoPackage database, called '''M01_001.gpkg''' in the '''Module_01\TUFLOW\model\gis''' folder, saves the '''2d_code_M01_001_R''' layer within it and opens it in the QGIS Layers panel.<br>
<br>
{{Video|name=Animation_M01_GPKG_Code_01a_.mp4|width=1274}}
[[File:Animation_M01_GPKG_Code_01.gif]]<br>
<br>
<li>'''TEST'''
<br>
<br>
[[File:Animation M01 Code 01c test.mp4]]<br>
<br>
</ol>
 
The model extent is provided in a common GeoPackageGPKG layer:
<ol>
<li>Load in the '''Model_Boundary.gpkg''' from the '''Module_01\Tutorial_Data''' folder. Either dragDrag and drop the '''Model_Boundary.gpkg''' into QGIS. or navigate to the file through the Browser Panel and double click.
<li>The region object in the '''Model_Boundary''' is not in the TUFLOW file format and needs to be copied into the '''2d_code_M01_001_R''' layer to have the correct attributes.
<li>Make the '''2d_code_M01_001_R''' layer editable by right clicking the layer and selecting 'Toggle Editing'.
Line 34 ⟶ 30:
<li>Select the '''2d_code_M01_001_R''' layer in the Layers panel by left clicking on it once. Select 'Edit' from the top QGIS tab and click 'Paste Features' from the drop down menu.<br>
<br>
{{Video|name=Animation_M01_GPKG_Code_02_.mp4|width=1274}}<br>
[[File:Animation_M01_Code_02c.gif]]<br>
<br>
<br>'''TEST'''<br>
<br>
[[File:Animation_M01_Code_02c_test.mp4|border]]<br>
<br>
 
</ol>
Define the area as active:
<ol>
<li>At present the '''2d_code_M01_001_R''' is not active. Using the 'Identify Features' tool click on the '''2d_code_M01_001_R''' region in QGIS. The attribute 'Code' has a value of 'NULL'.
<li>Right click on the 'NULL' value and select 'Edit Feature From', change the value to '1'. and clickClick 'OK'. <br>
<li>The feature ID 'fid' attribute is unique to GeoPackages. Leave this as 'Autogenerate' and QGIS will automatically assign a value.
<li>Toggle the editing off to save the edits.<br>
<br>
{{Video|name=Animation_M01_GPKG_Code_03a.mp4|width=1274}}
[[File:Animation_M01_GPKG_Code_03.gif]]<br>
<br>
<br>
</ol>
Line 57 ⟶ 51:
<li>Select ‘Apply TUFLOW Styles to Current Layer’.
<li>This updates the styling of the layer to display points on the region vertices and set the opacity to 25%.<br>
 
<br>
{{Video|name=Animation_M01_Code_04c_.mp4|width=1274}}
[[File:Animation_M01_Code_04c.gif]]<br>
<br>
<br>
</ol>
 
 
=Conclusion=