Tute M01 Active Areas QGIS Archive
Jump to navigation
Jump to search
Introduction
This page details the method for using QGIS to set an active model area. A preliminary model extent is provided for the tutorial model, this will be copied into a TUFLOW format file.
Method
- Load the 2d_code_empty_R.shp template file from the TUFLOW\model\gis\empty folder.
- Right click on the empty (template) layer 2d_code_empty_R in the layer control and select Save As...
- In the Save As section, hit the Browse button and save the file in the TUFLOW\model\gis\ directory as 2d_code_M01_002_R.shp
- Open the newly saved 2d_code_M01_002_R.shp file.
- The empty file can now be closed, to do this right click on the layer in the Layers section and select remove.
- Load the Boundary_region.shp file from the Module_Data\Module_01\QGIS\ folder.
- Set the 2d_code_M01_002_R layer as editable, by right-clicking on the layer and selecting Toggle Editing.
- Select the polygon provided from the Boundary_region layer. To do this, select the layer in the Layer control section, and hit the Select Single Feature from the menu as shown in the image below. Once this is selected, highlight the polygon (it should change colour when selected).
- Select Edit >> Copy Feature (Control + C).
- Select the 2d_code_M01_002_R layer in the layer control and select Edit >> Paste Feature (Control + V).
- Select the Identify Feature button (arrow beside blue i icon), and click on the polygon in the Map Window. The information window should show that the Code Feature is set to 1. This is shown in the image below.
- Note: If this is not the case, expand the Actions item and select Edit Feature Form.
- Note: If this is not the case, expand the Actions item and select Edit Feature Form.
- To finish the edit, select the toggle editing and when prompted, save the file.
- Enter the following line of text into the TGC file after the Set Code == 0 command and save the TGC file.
Read GIS Code == ..\model\gis\2d_code_M01_002_R.SHP
Conclusion
QGIS has been used to create a 2d_code layer which sets the code value for cells inside the boundary polygon to active (code = 1). Please return to the tutorial model module 1 page here.