Difference between revisions of "QGIS TUFLOW Run TUFLOW Utilities"

From Tuflow
Jump to navigation Jump to search
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
This tool offers a basic graphical user interface for the '''<u>[[TUFLOW_Utilities | TUFLOW Utilities]]</u>'''. Users can choose to use the interface for common use cases or use the advanced tab to use batch file commands directly. The tool also has a convenient option to automatically download the latest version of each utility.
 
This tool offers a basic graphical user interface for the '''<u>[[TUFLOW_Utilities | TUFLOW Utilities]]</u>'''. Users can choose to use the interface for common use cases or use the advanced tab to use batch file commands directly. The tool also has a convenient option to automatically download the latest version of each utility.
 
<br><br>
 
<br><br>
 +
__TOC__
 +
<br>
 
{{Tips Navigation
 
{{Tips Navigation
 
|uplink=[[TUFLOW_QGIS_Plugin#Usage| Back to TUFLOW QGIS Plugin Main Page]]
 
|uplink=[[TUFLOW_QGIS_Plugin#Usage| Back to TUFLOW QGIS Plugin Main Page]]
}}
+
}}<br>
<Br>
+
<Br><br>
 
==Running the Tool==
 
==Running the Tool==
 
The tool can be found in the TUFLOW Plugin toolbar, or via the QGIS menu '''Plugins >> TUFLOW >> TUFLOW Utilities'''.
 
The tool can be found in the TUFLOW Plugin toolbar, or via the QGIS menu '''Plugins >> TUFLOW >> TUFLOW Utilities'''.
Line 24: Line 26:
 
* '''Statistics''' - Computes a range of statistics of all input grids for each grid cell. Must add at least 2 grids via "Add Grids To Function". '''<u>[[ASC_to_ASC#Statistics | More information...]]</u>'''
 
* '''Statistics''' - Computes a range of statistics of all input grids for each grid cell. Must add at least 2 grids via "Add Grids To Function". '''<u>[[ASC_to_ASC#Statistics | More information...]]</u>'''
 
* '''Convert''' - Converts all inputs grids between ASC and FLT (the output format is dependent on the input format). Must add at least one grid via "Add Grids To Function". '''<u>[[ASC_to_ASC#Convert | More information...]]</u>'''
 
* '''Convert''' - Converts all inputs grids between ASC and FLT (the output format is dependent on the input format). Must add at least one grid via "Add Grids To Function". '''<u>[[ASC_to_ASC#Convert | More information...]]</u>'''
 +
* '''Breakline''' - Creates a 2d_zsh breakline from an input polyline and raster dem. The polyline must have the attributes of a 2d_zsh and be populated as per the <b><u>[[ASC_to_ASC#Extract_Breaklines_from_DEM | asc_to_asc documention]]. </u></b> ''(Available since v3.7.0.28)''.
 
<Br>
 
<Br>
 
'''TUFLOW_to_GIS'''<br>
 
'''TUFLOW_to_GIS'''<br>
Line 37: Line 40:
 
* '''Maximum''' - Calculates the maximum from a number of different inputs. Must specify at least one XMDF or DAT via "Add XMDF or DAT to Function". For XMDF inputs, must also specify a type using the dropbox. Users can also manually enter text here if the desired result type isn't listed. Input mesh layers mush have the same mesh (.2dm file). '''<u>[[RES_to_RES#Max | More information... ]]</u>'''
 
* '''Maximum''' - Calculates the maximum from a number of different inputs. Must specify at least one XMDF or DAT via "Add XMDF or DAT to Function". For XMDF inputs, must also specify a type using the dropbox. Users can also manually enter text here if the desired result type isn't listed. Input mesh layers mush have the same mesh (.2dm file). '''<u>[[RES_to_RES#Max | More information... ]]</u>'''
 
* '''Concatenate''' - Joins separate output files together into a single XMDF file. Must specify at least one XMDF or DAT via "Add XMDF or DAT to Function". For XMDF inputs, must also specify a type using the dropbox. Users can also manually enter text here if the desired result type isn't listed. Input mesh layers mush have the same mesh (.2dm file). '''<u>[[RES_to_RES#Concatenate | More information... ]]</u>'''
 
* '''Concatenate''' - Joins separate output files together into a single XMDF file. Must specify at least one XMDF or DAT via "Add XMDF or DAT to Function". For XMDF inputs, must also specify a type using the dropbox. Users can also manually enter text here if the desired result type isn't listed. Input mesh layers mush have the same mesh (.2dm file). '''<u>[[RES_to_RES#Concatenate | More information... ]]</u>'''
 
  
 
==Advanced==
 
==Advanced==
Line 49: Line 51:
  
 
==Executables==
 
==Executables==
The excecutables tab tells the tool where the utilities are located. They can be manually entered (the entered locations will be saved globally) or users can choose to let the tool automatically download the latest utilities from '''<u>[https://tuflow.com tuflow.com]</u>''' and update the paths.
+
The executables tab tells the tool where the utilities are located. They can be manually entered (the entered locations will be saved globally) or users can choose to let the tool automatically download the latest utilities from '''<u>[https://tuflow.com tuflow.com]</u>''' and update the paths.<br>
 +
<br>
 +
The '''ASC_to_ASC Version''' button can be used to get the version of the asc_to_asc utility. If the version is <b><u>[[ASC_to_ASC#2023-03-AA_.28and_later.29 | 2023-01]]</u></b> or later, then additional input and output options will be available in the 'Common Functions' tab as well letting users know they can use the latest formats in the 'Advanced' tab.
  
 
==Examples==
 
==Examples==
Line 61: Line 65:
 
[[File: TUFLOW_Utilities_CF_res2res_example.gif]]
 
[[File: TUFLOW_Utilities_CF_res2res_example.gif]]
 
<Br><Br>
 
<Br><Br>
'''Advanced Functions'''<Br>
+
'''Advanced Functions - Asc_to_Asc - Taking the difference between a Design Scenario and Existing Case'''<Br>
 +
[[File: TUFLOW_Utilities_Adv_diff_example.gif]]
 
<Br>
 
<Br>
 
<Br>
 
<Br>

Latest revision as of 13:00, 5 April 2024

This tool offers a basic graphical user interface for the TUFLOW Utilities. Users can choose to use the interface for common use cases or use the advanced tab to use batch file commands directly. The tool also has a convenient option to automatically download the latest version of each utility.


Up
Go-up.png Back to TUFLOW QGIS Plugin Main Page




Running the Tool

The tool can be found in the TUFLOW Plugin toolbar, or via the QGIS menu Plugins >> TUFLOW >> TUFLOW Utilities.
TUFLOW Utilities ToolIcon.PNG

Common Functions

Prior to running any of the tools, the tool must have access to the TUFLOW Utilities. This is done via the Executables tab.

The available utilities for Common Functions can be selected via the "Utility" dropbox at the top of the dialog. All utilities have optional output options:

  • Output Directory - directory to write the tool outputs. This option will generally not have affect unless an output name is also specified.
  • Output Name - output name of tool outputs. This can be specified independently of an output directory. (Note: prior to version 3.3 of the TUFLOW Plugin, output name required an output directory as well)
  • Save as Batch File - Saves the next run function as a batch file. The batch file will be saved into the output directory if one is specified, otherwise it will be saved to the same location as the other outputs.


Asc_to_Asc
Asc_to_Asc supports ASC and FLT raster formats. The following functions are available for asc_to_asc (inputs must have the same cell size and extents):

  • Difference - Takes the difference between 2 grids. Must specify an input for "Grid 1" and "Grid 2". More information...
  • Maximum - Computes the maximum of all input grids for each grid cell. Must add at least one grid via "Add Grids To Function". More information...
  • Statistics - Computes a range of statistics of all input grids for each grid cell. Must add at least 2 grids via "Add Grids To Function". More information...
  • Convert - Converts all inputs grids between ASC and FLT (the output format is dependent on the input format). Must add at least one grid via "Add Grids To Function". More information...
  • Breakline - Creates a 2d_zsh breakline from an input polyline and raster dem. The polyline must have the attributes of a 2d_zsh and be populated as per the asc_to_asc documention. (Available since v3.7.0.28).


TUFLOW_to_GIS
TUFLOW_to_GIS supports DAT or XMDF inputs and supports ASC and SHP as output formats. Users must specify an input XMDF or DAT file if running any of the functions. For XMDF inputs, the tool has the option to load XMDF information that will populate the available result types and timesteps. The following functions are available for TUFLOW_to_GIS:

  • Convert to Grid - Converts the DAT, or specified result type from an XMDF, at the chosen timestep to an ASC raster.
  • Convert to Point - Converts the DAT, or specified result type from an XMDF, at the chosen timestep to a Shape File vector point layer.
  • Convert to Vectors - Converts the DAT, or specified result type from an XMDF, at the chosen timestep to a Shape File vector polygon layer shaped as arrows. The arrow geometry is defined by the direction and magnitude of the input. The input must be of type vector (e.g. Velocity, Unit Flow).


Res_to_Res
Res_to_Res supports DAT or XMDF inputs and supports XMDF or DAT output formats. The following functions are available for Res_to_Res :

  • Info - Reads the XMDF header and outputs the information in an output window. Must specify an XMDF file in the "XMDF or DAT File" input. More information...
  • Convert - Converts between XMDF and DAT formats. The output format is dependent on the input format. Must specify an XMDF or DAT file in the "XMDF or DAT File" input. For XMDF, must also specify a type using the dropbox. Users can also manually enter text here if the desired result type isn't listed. More information...
  • Maximum - Calculates the maximum from a number of different inputs. Must specify at least one XMDF or DAT via "Add XMDF or DAT to Function". For XMDF inputs, must also specify a type using the dropbox. Users can also manually enter text here if the desired result type isn't listed. Input mesh layers mush have the same mesh (.2dm file). More information...
  • Concatenate - Joins separate output files together into a single XMDF file. Must specify at least one XMDF or DAT via "Add XMDF or DAT to Function". For XMDF inputs, must also specify a type using the dropbox. Users can also manually enter text here if the desired result type isn't listed. Input mesh layers mush have the same mesh (.2dm file). More information...

Advanced

Prior to running the tool from the advanced tab, the tool must have access to the TUFLOW Utilities. This is done via the Executables tab.

The advanced tab allows users to pass commands directly to the utilities as if they were using a batch file, however with the convenience of not having to actually create a batch file. If already working in QGIS, then the workflow is not interrupted and the final commands can be exported to a batch file for future use.

The utility should be selected from the dropdown box at the top of the dialog. It is recommended that users select a working directory. A working directory lets the users pass relative references to inputs via the argument text box. Arguements are entered under "Flags and Values" and should be identical to what are entered through a batch file with the exception that the utility exe location is not required and the batch file flag '-b' is also automatically added.

Users can also use the "Find File" for convenience. The chosen file(s) will be automatically added to the arguments text box. If a working directory is present, the input files will automatically be inserted with a relative referene to the working directory.

Executables

The executables tab tells the tool where the utilities are located. They can be manually entered (the entered locations will be saved globally) or users can choose to let the tool automatically download the latest utilities from tuflow.com and update the paths.

The ASC_to_ASC Version button can be used to get the version of the asc_to_asc utility. If the version is 2023-01 or later, then additional input and output options will be available in the 'Common Functions' tab as well letting users know they can use the latest formats in the 'Advanced' tab.

Examples

Common Functions - Asc_to_Asc - Converting multiple ASC rasters to fLT
TUFLOW Utilities CF convert example.gif

Common Functions - TUFLOW_to_GIS - Converting an XMDF depth result to an ASC raster - Optional extra step of naming the output file.
TUFLOW Utilities CF tuf2gis example.gif

Common Functions - Res_to_Res - Info
TUFLOW Utilities CF res2res example.gif

Advanced Functions - Asc_to_Asc - Taking the difference between a Design Scenario and Existing Case
TUFLOW Utilities Adv diff example.gif

Up
Go-up.png Back to TUFLOW QGIS Plugin Main Page