How to create a digital terrain model in OpenFlows FLOOD


Product(s):OpenFlowsTM FLOODTM
Version(s):10.XX.XX.XX
Area:Modeling

Overview

This tech-note explains how to create a Digital Terrain Model in OpenFlows FLOOD. 

Background

To create a digital terrain model in OpenFlows FLOOD, you’ll need to interpolate your digital terrain elevations data to the model's computational grid. For this you'll need to load / create the following information on to OpenFlows FLOOD Map:

Important Note: The examples and data used in this tech-note are as per the Graz dataset available in the Generic Start Guide for OpenFlows FLOOD. You can download the same here.

Loading the topography data

First, let’s load digital terrain data into the workspace, to make it available in the generation of the gridded digital terrain model (DTM). Digital terrain data can be obtained from many different sources (e.g. ETOPO, SRTM, local surveys, ContextCapture, etc).

One of the common formats used in OpenFlows FLOOD is XYZ. XYZ Files are used to define a set of points with x, y and z coordinates. These files are typically used to store information from bathymetric or topographic surveys.

An XYZ file is essentially a ASCII text file whose extension should be *.xyz. They contain 3 columns of data: X, Y and Z separated by spaces. Although not mandatory, the XYZ data can be wrapped between two block tags <begin_xyz> and <end_xyz>. A fourth column can be optionally included, and it is handled as a character string which can also be used as a legend for each point. In the following figure, a simple example of a three column OpenFlows FLOOD XYZ ASCII File is illustrated.

Figure 1 – Example of OpenFlows FLOOD XYZ file

To load a XYZ file go to Map menu > MOHID Specific Layers and click XYZ. Select the file path and choose the coordinate system in which the data is provided (Projected, Geographical, None or Custom). For Custom you can prescribe a Proj4 string to set the coordinate system.

If your terrain data is in Shapefile format use the conversion tool in Toolbox > File Conversion > ESRI Shapefile to XYZ. This will convert your data from shapefile format to XYZ. Once it is converted please follow the instructions above.

If your terrain data is in Raster format (ASC, ADF, TIFF, GeoTIFF, etc), then go Map menu > Common Data > Raster. Specify a name for the layer and click "Add" below to navigate to the raster file. Provide the projection and click "OK".

If your terrain data is in OpenRoads Designer DGN format, first you will need to use OpenRoads Designer to convert the DGN into a TIN format (see 0:35 in this video, select TIN as the format to export to) and then use the "TIN to MOHID" option in the File Conversion toolbox in FLOOD (available in version 10.03.00.01 and greater, see this for reference) to convert to XYZ format. After conversion please follow the instructions above.

Creating the computational grid for the model

After adding the topographical data, a 2D computational grid needs to be created; as this will specify the locations and resolutions of the 2D cells, which will be considered in the interpolation process for the generation of the digital terrain data. OpenFlows FLOOD is able to generate different types of grids, illustrated in the next figure:

Figure 2 – Different types of grids generated by OpenFlows FLOOD

Below is an example of creating a simple constant-spaced grid.

Open the Toolbox and double click on Grid > Create Constant Spaced Grid. This will open the “Constant Spaced Grid Tool” docked on the right of the main area. Your window should look like the one shown in the next figure.

Figure 3 – Create Constant Spaced Grid

 

The following table explains which settings and data are required to build a computational grid:

Parameter

Description

Coord.

Type of the coordinates to use. Options are geographic, UTM and metric (local) coordinates.

Origin X

X coordinate of the lower left corner.

Origin Y

Y coordinate of the lower left corner.

Columns

No of columns of the grid

Rows

No of rows of the grid

dX

Size of the grid cells along the X axis. Given in units of the coordinate system (in this case º).

dY

Size of the grid cells along the Y axis. Given in units of the coordinate system (in this case º).

Angle

Rotation of the grid.


Then, you need to save the grid file, by clicking in the lower-right button  . After this you will be prompted to define the target path and filename. When the tool closes, the grid is loaded in the Map Window:

Figure 4 – Created grid / Map visualization

Generating the Digital Terrain

OpenFlows FLOOD includes a powerful tool for the generation of digital terrain grid data files. The methodology to generate grid data changes depending on the type of topographical data i.e. XYZ, Shapefiles or Raster data which is explained below in detail.

Generate digital terrain from XYZ data

To generate a digital terrain file based in the topographical data select Toolbox, and then “Grid Data” and choose “Create Grid Data from XYZ Points” tool.

After double clicking Create Grid Data from XYZ Points” the following data would be available as shown in the image below;

Figure 5 – Create Grid Data

We can now construct the topography with the following options indicated in the following table.

Parameter

Value

Description

Grid

Grid

The grid which is to be used to create the grid data.

XYZ Points

[XYZ layer]

The point dataset(s) which are to be used to fill the grid. In this example we only have one, but you can use multiple XYZ files.

Polygons

n/a (default)

The polygon(s) which define non compute areas (water bodies in the case of MOHID Land). The model will not compute any values in the cell covered by these polygons.

XYZ Offset

10% (default)

Offset from the grid, in percentage, of the maximum distance from the “XYZ Points” are considered when using interpolation algorithms.

Fill Value

-99.0 (default)

The value to be attributed in non-compute areas. You should not change this value unless you have a specific reason for.

XYZ in NCA

Leave uncheck

If you want to consider a specific height in the non-compute areas for the interpolation process near the land-water interface.

Interpolation

Average

The interpolation method you want to use. If the density of points is smaller than the number of grid cell (not every cell contains a XYZ Point), then Triangulation is the recommended option.

Grid Data

C:\OpenFlows FLOOD Quick Start Guide\Projects\New Domain\General Data\Digital Terrain\DTM.dat”

The name of the file which will be created. It’s recommended to place this file inside the folder General Data\Digital Terrain of your project domain.


After filling all data, choose the process button ( ) to generate the topography. This process is finished when you see the following status message:

Figure 6 - Status message of the Construct Grid Data Tool

Close the status message and the tool window (using the x). Your main window should now like the one in the following figure.

Figure 7 – Visualizing Grid Data (Digital Terrain model)

Generate digital terrain from Raster data

To generate a digital terrain file based in the existing Raster data, select Toolbox, and then “Grid Data” > “Create Grid Data from Raster” tool. Double click the tool to open it, as shown in Figure 8.

Figure 8 - OpenFlows FLOOD Toolbox for Grid Data layers

The tool window will appear docked on the right-hand side of the “Map Window” as Figure 9 shows.

In options group “1. Base Information”, in “Grid”, select the grid layer corresponding to the model computational grid. In “Raster”, select the digital elevations raster layer. In “Polygons (Non-compute Areas – NCA)” you can select layers where you don’t want to calculate a solution. Ignore this option if you want to compute a solution in the entire model domain. 

In options group “2. Options”, a “Fill Value” and “Minimum Value” select the default options and in Grid Data select the path to the Grid Data file to be created.

In options group “3. Generate Grid Data”, press the button to start the interpolation process and wait for a message box stating that the Grid Data file has been generated. Press “OK” and the Grid Data file will be automatically loaded in to the Map view.

Figure 9 - Create Grid Data (DTM) from Raster

Generate digital terrain from Shapefiles

As mentioned above shapefiles cannot be directly used to create digital terrain files. The shapefiles need to be converted to XYZ format  in Toolbox > File Conversion > ESRI Shapefile to XYZ. After conversion follow the steps for generating digital terrain from XYZ data

See Also

OpenFlows FLOOD TechNotes and FAQ's

Learning Resource Guide for users of OpenFlows FLOOD