View Results in MapInfo (TUFLOW to GIS) Archive
- Download the TUFLOW_to_GIS utility and unzip. Take note of where this utility is located.
- Create an empty text file in the TUFLOW\results\M01\2d\ directory and name the file Process_Results.bat
- Open the text file in a text editor
- Add the following lines to the Process_Results.bat (these can be copied and pasted from below) and then save the batch file:
REM Any text following "REM" is treated as a remark or comment.
REM Process the maximums for water level, depth and velocity.
C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -max M01_5m_002_h.dat
C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -max M01_5m_002_V.dat
C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -max M01_5m_002_d.dat
REM Process the depths at times 1, 2 and 3 hours.
C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -t1 M01_5m_002_d.dat
C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -t2 M01_5m_002_d.dat
C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -t3 M01_5m_002_d.dat
REM Process the velocity vectors at times 1, 2 and 3 hours.
C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -mif -vector -t1 M01_5m_002_V.dat
C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -mif -vector -t2 M01_5m_002_V.dat
C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -mif -vector -t3 M01_5m_002_V.dat
Pause REM this keeps the Command Window open after processing - In Windows Explorer navigate to the TUFLOW\results\M01\2d\ directory and double click on the newly created batch file Process_Results.bat. A console window should appear and the batch file may process for a minute or so. When finished the output screen should look like screen image below:
- In MapInfo bring up the Grid Import dialogue by selecting the following menu items Vertical Mapper >> Create Grid >> Import Grid.
- Select Add... and then navigate to the TUFLOW\Results\M01\2D\ directory. To import all grids, select all of the .asc files (by holding down the shift key) and then select Open.
- When prompted, select the Category: Universal Transverse Mercator (WGS 84) and the category member UTM Zone 60, Southern hemisphere (WGS 84). Check the Use for all imports of similar type checkbox, as per the image below.
- When prompted select the Z-Units for the import to Metres and check the Use for all imports of similar type checkbox, as per the image below.
- The grid import window should now look like the image below. Select OK to import all of the results grids.
- Turn on the aerial photo and the maximum depth grid (M01_5m_002_d_g002.50_Max)
- Do do this select the Grid Info icon (highlighted in the toolbar in the image below) and click in the Map Window. A new window titled Grid Info should appear and list the values in the active grids.
- In the Grid Manager, Uncheck the Grid Info for all grids except the M01_5m_002_h_g002.50_Max (maximum water level) To create a long section of the water level results. The Vertical Mapper Cross-Section utility can be used. The icon for this is highlight in the image below.
- Select the Cross-Section tool and draw a polyline from the upper inflow boundary to the downstream boundary. Double click to terminate the line. A section window should appear.
A grid can also be contoured into regions or lines. To create contours of the maximum water levels, select the grid in the Grid manager dialogue and select the Contour button. This is highlighted in the image below.
- To create 0.5m interval contour lines, in the contour dialogue (see image below), make the following changes:
- Ensure that the Grid: is the water level (M01_5m_002_h_g002.50_Max)).
- Select Polylines (the default is Regions).
- Select the Intervals And set a minimum of 38, a maximum of 50.5 and an interval of 0.5.
- Give the output a sensible file name (I have used M01_5m_002_hMax_Lines)
TIP: The Gradient... option can be used to change the colour profile. - Select Ok to begin the contouring.
- To import the velocity vectors use the Table >> Import to import the three .mif files produced. These must be imported one at a time. Tip: A batch import function is available in the miTools utilities. Using the Layer Control you can turn on the various results files.
- To view the depth (grid) and velocity vectors at time 1 hour in the model simulation. In layer control add the following M01_5m_002_d_g002.50____1.00 (depth at time 1hr) and M01_5m_002_V____1.00_v (velocity vectors at time 1hr) to the aerial photo.
- Changing the colour profile of a results grid
- Point inspecting results
- Taking profiles of results
- Contouring of results
Introduction
In this section we will look at post-processing the TUFLOW results so they can be imported and viewed in MapInfo. We will bring 3D surfaces (as gridded datasets) and point / vector data.
TUFLOW to GIS
In order to bring the 2D results written by TUFLOW (for example a water level surface) into MapInfo it is necessary to utilise a TUFLOW utility called TUFLOW_to_GIS.exe this utility can be downloaded from the TUFLOW website (TUFLOW Downloads).
There is separate wiki page on how to use the TUFLOW_to_GIS utility. This page can be found here TUFLOW to GIS.
In windows explorer there should be 12 new files created, 6 .asc files and 3 each for the .mif and .mid files. These files are shown in the image below.
TIP: If there are not 12 files created remove the -b switches from the batch file. The TUFLOW_to_GIS utility will prompt for an input after each command line. This can be useful in determining why the process has stopped.
Import to MapInfo
Import Surfaces using Vertical Mapper
Viewing Surfaces
To change the styling of the visible layer, bring up the Vertical Mapper Grid Manager, this can be done by selecting the menu item Vertical Mapper >> Show Grid Manager.
Select the M01_5m_002_d_g002.50_Max grid and select Colour option. This should bring up a data histogram and colouring utility. Here you can change the colouring options.
TIP: Once you have a colour profile you are happy with this can be saved, so it can be applied to other grids.
The value from the TUFLOW results can be inspected at any point by using the Vertical Mapper Grid Info utility.
To control which grids information is displayed for, in the Grid Manager window, use the check box under the i? (first column).
TIP: Use the Save As... and Load... options, to contour multiple grids to the same interval and styling.
Once completed (this should only take a few seconds), a new table containing the contour lines will be created. This can be added to a map and labelled using either of the label buttons, highlighted in the image below. The button within the Layer Control (to the right of the table name) will label all lines, the button in the toolbar allows the user to select lines to be labelled. To change the label propoerties, right click on the table in the Layer Control and select layer properties, select Label Display to change the labelling options.
Import Vectors
Viewing Vectors
The vectors are MapInfo tables containing the arrows as polygon objects. These can simply be added to any map window, these will need to appear above the aerial photos and results grids to be visible.
The info tool (green i) can be used to interrogate the velocity at each vector location, to determine the velocity magnitude.
To view the results at different times, simply add and remove the grids and velocity results for the appropriate time. For example remove (or turn off the visibility) of M01_5m_002_d_g002.50____1.00 and M01_5m_002_V____1.00_v and add M01_5m_002_d_g002.50____2.00 and M01_5m_002_V____2.00_v to view the depth and velocity at output time 2 hours.
Conclusion
In this page we have introduced TUFLOW_to_GIS for processing of TUFLOW results into MapInfo format. These results have been imported into MapInfo for viewing. We have also covered:
For those progressing through the tutorial module 1, you can return to the tutorial module here.