TUFLOW to GIS
|TUFLOW FV Wiki Main Page||Products Support/Contact||TUFLOW FV Downloads|
|TUFLOW FV Tutorials||Requesting a Licence||Tutorial Module Data|
|TUFLOW Classic/HPC Wiki||TUFLOW FV Glossary||Manuals|
The TUFLOW_to_GIS.exe is a utility available on the the TUFLOW website (Download TUFLOW FV utilities).
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. A batch file is simply a plain text file containing one or more lines that execute a utility as per the example sections below.
Gridded (raster) data is outputted in the ESRI ASCII grid format. This is plain text format and is very widely recognised and used by a variety of GIS software including ArcGIS (requires Spatial Analyst), QGIS, SAGA and MapInfo (requires Vertical Mapper or Encom Discover). This is specified with the flag -asc.
Vector outputs (e.g. velocity or flow) can be written as either points or arrows. Scalar outputs (e.g. depth or level) can be written as points. These can currently be written out in either MapInfo format (.mif) or ArcGIS shapefiles (.shp). The -mif flag is used to output in MapInfo format and -shp to output in shapefile format. Only one type (-mif or -shp) can be processed at a time, to output in both formats, use two entries in a batchfile.
Input Flags (switches)
A list of the most common switches is outlined below:
|"-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, SAGA and QGIS)|
|"-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, QGIS 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"||This switch is presently not supported for TUFLOW FV output|
|"-sf<scale factor>"||Scale factor to scale the size of the arrows. The default is sf = 1, which means either:|
|"-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 north-south aligned 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 or -shp 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>"||This switch is presently not supported for TUFLOW FV output|
Converting to grids
Probably the most common use of the TUFLOW_to_GIS utility is to convert the model results to a 3D surface. A number of examples are given below:
- Convert to a 3D grid of specified grid cell size at a specific time:
- Extract maximum water level results and convert to a 3D grid of specified grid cell size:
TUFLOW_to_GIS.exe -2dm Tute.2dm -asc -b -grid2 -t111111 -2dm Tute.2dm M01_5m_003_h(maxmax).dat
Description: Maximum water level results to grid asc ("-asc"), using batch mode ("-b"), at a 2m grid resolution ("-grid2"), at time the RES_to_RES maximum output time of 111111 hours ("-t111111"), 2dm file = Tute.2dm ("-2dm"), result file = M01_5m_003_h(maxmax).dat.
Converting to Points
To output to a points file specify either a MapInfo output with the "-mif" switch or Arc shapefiles output with the "-shp" output:
- Convert velocity at time 2 hours to a MapInfo points file using a 2m grid resolution:
Converting to Arrows
To output to vectors file specify either a MapInfo "-mif" or Arc shapefiles ("-shp") output type and the "-vector" option. This will create a vector dataset, with the vectors stored as polygon objects.
The size of the vectors can be controlled with the scale factor ("-sf") switch. NOTE: The input .dat file or dataset type must be a vector dataset, such as velocity or unit flow.
- Convert output time 2 to a MapInfo vector file at cell corners using a 2m grid resolution:
- Convert output time 2 to a MapInfo vector file:
Creating a Batchfile
Create a plain text file listing the series of commands which you would like to execute.
TUFLOW_to_GIS.exe -asc -b -grid2 -t2 M01_5m_003_h.dat TUFLOW_to_GIS.exe -asc -b -grid2 -t2 M02_5m_003_h.dat
Save the file with at .bat extension. Double clicking the file within Windows Explorer will start the batchfile.
Note: Absolute or relative reference to the TUFLOW_to_GIS.exe and the TUFLOW FV result file (*.dat) from the folder location where the batchfile is saved is required.
e.g. absolute referencing: D:\TUFLOW_FV\Utilities\TUFLOW_to_GIS.exe e.g. relative referencing: ..\output\M02_5m_003_h.dat