TUFLOW to GIS
Introduction
The TUFLOW_to_GIS.exe is a utility available on the the TUFLOW website (http://www.tuflow.com/Downloads_Utilities.htm Download TUFLOW utilities]).
The utility can be used to convert TUFLOW outputs (.dat and .xmdf) into formats that can be imported into GIS packages such as MapInfo, ArcGIS and SAGA. For more details on the TUFLOW utility please see section 11.2 of the 2010 TUFLOW manual.
Running TUFLOW_to_GIS
Simply double clicking on the TUFLOW_to_GIS executable will bring up a DOS prompt that that gives you some instructions on running the utility.
The most common way to run the utility is from a batchfile. This allows the user to process multiple outputs at once.
Output Options
Gridded Data
The major output options are 3D grid in .asc format, which can be read into ArcGIS (requires Spatial Analyst), SAGA and MapInfo (requires Vertical Mapper or Encom Discover). This is specified with the flag -asc.
Point and Vector Data
Vector outputs can be written as either points or arrows. Scalar output can be written as points. These can currently be written out in MapInfo .mif format. The -mif flag is used to output in MapInfo format.
Input Flags (switches)
A list of the input switches is provided in the 2010 TUFLOW manual as Table 11.1. However the most common arguments are:
Switch | Description |
---|---|
"-b" | Run the utility in batch mode, this suppresses the prompt to press enter at the end of processing. Used in .bat files where two or more files are to be processed. |
"-asc" | The output file will be in ESRI ASCII Grid format, a text format recognised by most 3D grid modelling software (including Vertical Mapper and SAGA) |
"-mif" | The output format will be the MapInfo Interchange format (.mif/.mid) recognised by most GIS software |
"-shp" | The output format will be the ArcGIS Shapefile format. This can be opened directly in ArcMap or SAGA (and most GIS software) |
"-vector" or "-arrows" | The output will contain arrows as polygons to display vector data (eg. velocities and unit flows) in GIS. Must be used with the -mif option. |
"-t<output time>" | Converts the data at the specified timestep, for example -t2 to convert output time 2 hours. If this switch is omitted the utility will display a list of available times and prompt for an input. Use -t99999 or -max to convert the maximums. |
"-max" or "-t99999" | The maximums will be converted. The maximums must have been written to be able to convert using the -max or -t99999 switch. See the .tcf file command (Store Maximums and Minimums == ON MAXIMUMS ONLY). |
"-sf<scale factor>" | Scale factor to scale the size of the arrows. |
"-2dm <.2dm file>" | To explicitly specify a .2dm file. By default TUFLOW_to_GIS assumes the .2dm file has the same name as the .dat file. Must be a space between -2dm and “<2dm_file>”. |
"-grid<dist>" | The output will be on a regular grid of spacing <dist> metres. If no <dist> is specified the user is prompted to enter a distance (e.g. "-grid"). If no grid input is used with a -mif conversion the data is converted at the cell corners. For a "-asc" output if no grid input is specified the default is 1/2 of the 2D cell size. For -asc output it sets the raster cell size of the 3D ESRI ASCII grid. |
"-type<output type>" | For use with .xmdf inputs, in which all inputs are stored in the one .xmdf file. Use this to convert a specific output type. Output types should as specified per the output type in the .tcf eg. h (water level), V (velocity), q (flow), or d (depth).Scale factor to scale the size of the arrows. |
Examples
- Convert maximums to a 3D grid:
- TUFLOW_to_GIS.exe -asc -b -max M01_5m_003_h.dat Description: Convert to a 3D grid ("-asc"), using batch mode ("-b"), converting the maximums ("-max") for the water level results M01_5m_003_h.dat.
- Convert to a 3D grid at a specific time:
- TUFLOW_to_GIS.exe -asc -b -t3 M01_5m_003_h.dat Description: As per example 1, except conversion at time 3 hours (-t3) instead of the maximums.
- Convert to a 3D grid of specified grid cell size:
- TUFLOW_to_GIS.exe -asc -b -grid1 -max M01_5m_003_h.dat Description: As per example 1, except the raster cell size is specified at 1m instead of being half the 2D cell size.
- Convert to a 3D grid from .xmdf file:
- TUFLOW_to_GIS.exe -asc -b -typeh -max M01_5m_003.xmdf Description: As per example 1, output TUFLOW format is .xmdf. The -typeh specifies the h(water level) output to be converted.
- TUFLOW_to_GIS.exe -asc -b -typeV -max M01_5m_003.xmdf Description: As per example 4, except the the velocity results (-typeV) are processed instead of water level (-typeh).
Converting to 3D grids
Probably the most common use of the TUFLOW_to_GIS utility is to convert the maximum results to a 3D surface. A number of examples are given below: