View source for View Results in MapInfo (TUFLOW to GIS) Archive
←
View Results in MapInfo (TUFLOW to GIS) Archive
Jump to navigation
Jump to search
<ol> ==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 [http://www.tuflow.com/ProductDownload.aspx (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|TUFLOW to GIS]]. <li> Download the TUFLOW_to_GIS utility and unzip. Take note of where this utility is located.</li> <li> Create an empty text file in the '''TUFLOW\results\M01\2d\''' directory and name the file '''Process_Results.bat'''</li> <li> Open the text file in a text editor</li> <li> Add the following lines to the '''Process_Results.bat''' (these can be copied and pasted from below) and then save the batch file:<br> <tt><font color="grey">REM Any text following "REM" is treated as a remark or comment.<br> REM Process the maximums for water level, depth and velocity.<br></font> C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -max M01_5m_002_h.dat<br> C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -max M01_5m_002_V.dat<br> C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -max M01_5m_002_d.dat<br> <font color="grey">REM Process the depths at times 1, 2 and 3 hours.</font><br> C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -t1 M01_5m_002_d.dat<br> C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -t2 M01_5m_002_d.dat<br> C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -asc -t3 M01_5m_002_d.dat<br> <font color="grey">REM Process the velocity vectors at times 1, 2 and 3 hours.</font><br> C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -mif -vector -t1 M01_5m_002_V.dat<br> C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -mif -vector -t2 M01_5m_002_V.dat<br> C:\TUFLOW\Utilities\TUFLOW_to_GIS.exe -b -mif -vector -t3 M01_5m_002_V.dat<br> Pause <font color="grey">REM this keeps the console window open after processing</font> </tt></li> <li>In Windows Explorer navigate to the '''TUFLOW\results\M01\2d\''' directory and double click on the newly created batch file '''Process_Results.bat'''.</li> 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:<br> [[File:T2G M01 Finished.png|750px]] <br> 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.<br> '''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.<br> [[File:T2G M01 Outputs.png|200px]] <br> ==Import to MapInfo== === Import Surfaces using Vertical Mapper=== <li> In MapInfo bring up the ''Grid Import'' dialogue by selecting the following menu items ''Vertical Mapper >> Create Grid >> Import Grid''.</li> <li> 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''.</li> <li>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.<br></li> [[File:VerticalMapper Projection.png|500]] <br><br> <li>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.<br></li> [[File:VerticalMapper Zunit.png|300px]] <br><br> <li>The grid import window should now look like the image below. Select ''OK'' to import all of the results grids.<br></li> [[File:VerticalMapper GridImport.png|400px]] <br><br> === Viewing Surfaces === <li> Turn on the aerial photo and the maximum depth grid ('''M01_5m_002_d_g002.50_Max''')</li><br> [[File:Tute M01 VM MaxDepth.png|750px]] <br><br> 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''.<br> [[File:Tute M01 VM GridManager.png|300px]] <br><br> 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.<br> '''TIP:''' Once you have a colour profile you are happy with this can be saved, so it can be applied to other grids.<br> [[File:Tute M01 VM GridColour.png|700px]] <br><br> The value from the TUFLOW results can be inspected at any point by using the Vertical Mapper Grid Info utility. <li>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.</li><br> [[File:Tute M01 VM Grid PointInspect.png|750px]] <br><br> To control which grids information is displayed for, in the ''Grid Manager'' window, use the check box under the '''i?''' (first column). <li> In the Grid Manager, Uncheck the Grid Info for all grids except the '''M01_5m_002_h_g002.50_Max''' (maximum water level)</li> 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.<br> <li>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.<br> [[File:Tute M01 VM Grid Section.png|750px]] <br><br> [[File:Tute M01 VM Grid SectionOut.png|750px]] <br><br> 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.<br> [[File:Tute M01 VM Contour.png|400px]] <br><br> <li>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''') </li> '''TIP:''' The ''Gradient...'' option can be used to change the colour profile.<br> '''TIP:''' Use the ''Save As...'' and ''Load...'' options, to contour multiple grids to the same interval and styling.<br> <li>Select Ok to begin the contouring.</li><br> [[File:Tute M01 VM ContourLines.png|400px]] <br><br> 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.<br> [[File:Tute M01 ContourLines Map.png|750px]] <br><br> === Import Vectors === <li>To import the velocity vectors use the ''Table >> Import'' to import the three .mif files produced. These must be imported one at a time. </li> '''Tip:''' A batch import function is available in the miTools utilities. Using the ''Layer Control'' you can turn on the various results files. === 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. <li>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.</li><br> The info tool (green i) can be used to interrogate the velocity at each vector location, to determine the velocity magnitude.<br> [[File:Tute M01 VM Depth Vel at 1hr.png|750px]] <br><br> 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:<br> * Changing the colour profile of a results grid * Point inspecting results * Taking profiles of results * Contouring of results For those progressing through the tutorial module 1, you can return to the tutorial module [[Module1_test#Viewing_the_Results | here]]. </ol>
Return to
View Results in MapInfo (TUFLOW to GIS) Archive
.
Navigation menu
Personal tools
English
Log in
Namespaces
Page
Discussion
English
Views
Read
View source
View history
More
Search
Navigation
Main page
Recent changes
Random page
MediaWiki help
Tools
What links here
Related changes
Special pages
Page information