Need help working from home with your Bentley software? We're here to help - click here

How to create a digital terrain model in OpenFlows FLOOD

Product(s): OpenFlows FLOOD
Version(s): 10.00.02.XX
Area: Modeling


This article explains how to create a Digital Terrain Model in OpenFlows FLOOD. 

1 How to create a digital terrain model in OpenFlows FLOOD

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

  • Digital terrain data (in XYZ, shapefile, or Raster format (ASC, ADF, TIFF, GeoTIFF, etc)
  • The model’s computational grid
  • (optionally) A polygon defining the areas where the model will not calculate any values.

1.1.1 Loading XYZ 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. If digital terrain data is provided in shapefile format, please 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 below. If it’s given in Raster format (ASC, ADF, TIFF, GeoTIFF, etc), please refer to the chapter “Generate digital terrain model from Raster”.

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. XYZ Files are ASCII text file which extension should be *.xyz. They contain 3 columns of data: X, Y and Z separated by spaces. The first line in the file must be:  <begin_xyz> and the last must be <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 -> Specific MOHID 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.

1.1.2 Create the computational grid for the model

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

As an example, we will create 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:




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.


Nº of columns of the grid


Nº of rows of the grid


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


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


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

1.1.3 Generate the digital terrain from XYZ Points

OpenFlows FLOOD includes a powerful tool for the generation of digital terrain grid data files. To generate a digital terrain file based in the existing XYZ data file previously loaded select Toolbox, and then “Grid Data” -> “Create Grid Data from XYZ Points” tool. Double click the tool to open it, as shown in the next figure:

Figure 5 – Create Grid Data

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






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.


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.


Leave uncheck

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



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)

1.1.4 Generate the digital terrain from Raster

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 - MOHID Studio 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