Difference between revisions of "Tute M01 Active Areas SAGA"

From Tuflow
Jump to navigation Jump to search
m (Protected "Tute M01 Active Areas SAGA": High traffic page ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
(No difference)

Revision as of 11:37, 29 September 2011

    Introduction

    This page details the method for using SAGA to set an active model area. A preliminary model extent is provided for the tutorial model, this will be merged into a TUFLOW format file.

    Method

  1. Load the 2d_code_empty_R.shp template file from the TUFLOW\model\saga\empty folder.
  2. Load the Boundary_region.shp file from the Module_Data\Module_01\SAGA\ folder.
  3. The next step is to copy the boundary region to a TUFLOW format file (2d_code_empty_R). To do this in SAGA the easiest way is to merge the tables.
  4. Start the Shape Merge Module, by selecting Modules >> Shapes>> Construction >> Merge Shapes Layer.
    Tute M01 Saga 2d code 1.png


  5. In the Merge Shapes Layers Dialogue set the following:
    • Merged Layer = Create
    • Main Layer = 2d_code_empty_R
    • Additional Layers = Boundary_Region
    As per the image below. Select Okay.
  6. Tute M01 Saga 2d code 2.png


    By merging the layers, the file format will be as specified in the main layer (2d_code_empty_R), but objects from the additional layers will be included.

  7. A new shape layer called Shapes_Merge will be created. In the data tab of the workspace window, right click on the Shapes_Merge layer and select Save As.
    Save the as 2d_code_M01_003_R.shp in the TUFLOW\model\saga\ folder (not in the empty directory, as the file is no longer empty!).
  8. Tute M01 Saga 2d code 3.png


    The file shoud now be ready for use in TUFLOW, however, we will review the file.

  9. Load the newly created 2d_code_M01_003_R.shp file.
  10. Load the DEM Module_Data\DEMs\SAGA\DEM_M01.sgrd.
  11. Create a new Map Window that contains both the DEM and the 2d_code layer. To do this, in the Data tab of the workspace window, select both of these layers, right click and select show.
  12. Tute M01 Saga 2d code 4.png


    A new map should appear, looking something like the image below.
    TIP: To change the style of the 2d_code layer, select this in the workspace window, and the modify the Display settings (in the Settings tab of the Object Properties Window).

    Tute M01 Saga 2d code 5.png


  13. Ensure the 2d_code_M01_003_R layer is highlighted in the workspace window, select the action cursor (arrow) and then select the region in the Map Window. To see the attributes associated with the object navigate to the Attributes tab of the Object Properties Window. This is shown in the image below.
  14. Tute M01 Saga 2d code 6.png


  15. In the attributes window, we can seen the region object has three attributes:
    • Code = 1
    • Layer_ID = 2
    • Layer = Boundary_region
    Only the first attribute is required by TUFLOW. The code value of 1, tells TUFLOW that any cells within this GIS region should be active.
    The additional attributes were added by the merge process, these data attributes will be ignored by TUFLOW, alternatively they can be deleted, using the methodology below.
  16. To delete the additional attributes created by the merge process, right click on the shape layer in the workspace tab and select Attributes >> Show.
  17. Tute M01 Saga 2d code 7.png


  18. Select Delete Fields (icon shown below).
  19. Delete Fields Icon


  20. Select the "Layer_ID" and "Layer" checkboxes, and select Okay.
  21. Tute M01 Saga 2d code 9.png


  22. Re-selecting the region object, should show the updated attributes.
  23. Tute M01 Saga 2d code 10.png


  24. Right click on the 2d_code layer in the workspace window and select Save.
  25. Tute M01 Saga 2d code 11.png

    Conclusion

    SAGA 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.