Create a Grid#

Overview

This module will outline how create a grid using QGIS, FLO-2D Plugin and project data. Calculate elevation and roughness to the grid.

Required Data

The required data is in the Coastal 2D Training Folder.

File

Content

*.tif

Elevation Raster

*.shp

Project AOI

*.shp

Manning_n

Path: …\Coastal 2D Training\Project Data\AOI

Step 1: Set up the FLO-2D project#

  1. Open QGIS 3.22.9 or newer.

  2. Drag the Project Area of Interest shapefile onto the map.

Path: …\Coastal 2D Training\Project Data\AOI

../../_images/aoi.png
  1. Click the Set-up button.

../../_images/creategrid001.png
  1. Click create.

../../_images/creategrid002.png
  1. Save the geopackage file to the project folder.

  2. Name the file Coastal Project.gpkg.

Path: …\Coastal 2D Training\Coastal Project.gpkg

  1. Set the project CRS to Florida East HARN USft. Filter the list with an EPSG code: 2881. Select EPSG: 2881 and click OK.

../../_images/creategrid003.png
  1. Wait for the geopackage to write and check the accuracy of the project settings and click OK.

../../_images/creategrid004.png

Step 2: Create the grid#

  1. From the Grid Tools widget, select Create Grid.

../../_images/creategrid005.png
  1. Select the Project Domain layer, and the Cell Size field and click OK.

../../_images/creategrid006.png

Note

The Project Area of Interest is a simple template. If your own project doesn’t have a polygon layer that represents the project area, one can be digitized into the Computational Domain Layer. In order to align the grid to a raster, load the raster file into the dialog box.

  1. Click OK to close. The grid is complete.

../../_images/creategrid007.png

Step 3: Save the project#

  1. Click the main Save button on the QGIS toolbar.

../../_images/creategrid008.png
  1. Navigate to the coastal folder, name the project Coastal Project.qgz and click Save.

Path: …\Coastal 2D Training\Coastal Project.qgz

Step 4: Assign grid elevation#

  1. Uncheck the Project Area of Interest Layer.

  2. Click the Computational Domain Layer

../../_images/creategrid011.png
  1. Import the elevation file. Open the project folder and drag the Elevation Raster.tif file onto the map space.

\Coastal 2D Training\Project Data\AOI\Elevation Raster.tif

../../_images/creategrid009.png
  1. Move the elevation raster layer to the bottom of the layers list and click it to activate the Elevation layer.

../../_images/moveelevationtobottom.gif
  1. To interpolate the elevation to a grid layer from a raster layer, use the Sample Grid Elevation button.

../../_images/creategrid010.png
  1. Click on the Sample Grid Elevation button and enter the required data in the dialog fields and click OK.

  2. Sampling Done dialog box will appear once the process is complete. Click OK to close it.

Note

Use the Fill NoData option if the elevation raster is missing data such as buildings. This method uses the GDAL Warp processing tool. To learn more about GDAL Warp, visit this page:

https://gdal.org/programs/gdalwarp.html

../../_images/creategrid012.png ../../_images/Worksh154.png

Step 5: Assign roughness data#

  1. Open the project folder and drag the Mannings_n.shp file onto the map space.

../../_images/creategrid013.png
  1. Click the Sample Roughness button.

../../_images/creategrid014.png
  1. Fill the dialog box and click OK.

../../_images/creategrid015.png
  1. Once the sample is complete, the following window will appear. Close the window. It is OK if your time is different from the time in the following image.

../../_images/creategrid016.png
  1. The roughness values and elevations are assigned to the grid layer in the Schematized Layers group. Use the Grid Info Tool to see individual values for each cell.

  2. Click the Grid Info button and then click any grid element in the map area.

../../_images/creategrid017.png ../../_images/creategrid018.png

Step 6: Assign Control Variables#

  1. Click the Set Control Parameters Button.

../../_images/creategrid023.png
  1. Fill the dialog box using the two figures below. Save the data to the GeoPackage with the Save button.

Note

The variable descriptions and additional instructions are presented in the Data Input Manual.

C:\Users\Public\Documents\FLO-2D PRO Documentation\flo_help\Manuals\Data Input Manual PRO.pdf

../../_images/Worksh018.png ../../_images/Worksh019.png

Step 7: Save the project#

  1. Click the main Save button on the QGIS toolbar.

../../_images/Worksh011.png

Step 8: Create a backup file#

  1. Close QGIS.

  2. Open the project folder. Select the Coastal Project.gpkg and Coastal Project.qgz files. Right click them and click Sent to/Compressed (zipped) folder.

../../_images/creategrid019.png
  1. Name the zipped file. It is good to choose a name that identifies project progress. For Example: Elevation and nvalue OK.zip

../../_images/creategrid020.png
  1. Open QGIS and reload the project.

../../_images/creategrid021.png
  1. Click yes to load the model.

../../_images/creategrid022.png