4. TUFLOW Viewer V2 vs Legacy TUFLOW Viewer
The first, and main, difference between the legacy TUFLOW Viewer and the new TUFLOW Viewer is the removal of the docking widget interface. The new viewer has no interface and instead relies on native functionality within QGIS to provide a more integrated experience. This means there is no longer a dedicated time slider provided by TUFLOW Viewer and the user should use the QGIS Temporal Controller to adjust the output timestep.
Likewise, when selecting the active result types, the QGIS layer properties should be used to adjust which data type is active for mesh based results. It is recommended to use the Styling Panel rather than the properties dialogue, as this can be toggled quickly with the F7 or Ctrl+3 keyboard shortcuts and does not lock the interface with a modal dialogue.
Note, the new TUFLOW Viewer removes the interface, but is still working in the background to provide a better experience when working with TUFLOW results in QGIS. As an example, the TUFLOW Viewer enables XMDF files to be opened in QGIS by dragging and dropping them directly from Windows File Explorer. It also allows results to be dragged from one QGIS instance to another.
4.1 High Level Differences¶
- Removal of the docking widget interface as mentioned above.
-
The new viewer is built on top of the PyTUFLOW Python library which provides a more robust and efficient method for reading TUFLOW results. Users should notice an improved performance all round, especially when loading and plotting from large ESTRY result files. Load times of large XMDF files are similar between the legacy and new viewer as this is controlled by the underlying QGIS library. Although a significant performance improvement has been made to the section plot, see the table below for more detailed metrics. Along with the section plot performance improvement, PyTUFLOW will perform better caching of data in the background, so users should still notice an improvement here too when replotting previously plotted locations (e.g. when scrolling backwards and forward through timesteps on a section plot).
Section plot performance comparison between legacy TUFLOW Viewer and TUFLOW Viewer V2. Model Name Number of Cells Selected by Line Legacy TUFLOW Viewer (sec) TUFLOW Viewer V2 (sec)** FMA_T2_10.00m 1,205 28.0 0.76 FMA_T2_05.00m 2,367 267 1.15 FMA_T2_02.50m 4,690 —* 2.99 Note
* Legacy TUFLOW Viewer was unable to complete the section plot within a reasonable timeframe (> 30 minutes).
** The majority of the time is taken finding the intersecting cells along the line, subsequent data extraction is significantly faster.
-
Each loaded result is tied directly to a specific GIS layer, or set of GIS layers. For example, an XMDF is linked to the mesh layer, and the TPC result is tied to the "_PLOT_" layers that are loaded when the TPC file is opened. Once those layers are removed from QGIS, the results are also unloaded, this means that they will no longer be available for plotting. The biggest affect that this might have is when loading multiple TPC results which will load in multiple sets of "_PLOT_" layers. The plot layers may be identical (e.g. when loading in results from different events), however the user must keep all the layers in QGIS to keep the results available for plotting. It is still possible to plot the different results by selecting a channel from a single "_PLOT_" layer, as long as the ID is present in the other TPC results.
4.2 Specific Differences¶
This section is designed to give a brief overview of some of the more specific differences between the legacy and new viewer for users who are familiar with the legacy TUFLOW Viewer. It is not an exhaustive list, but covers some of the more notable changes so users can get started quickly without reading through the entire user guide.
4.2.1 Plotting¶
- Map output - plot "from map multi": In the legacy TUFLOW Viewer, there was a specific plotting option to add multiple points, or multiple lines, to a single-plot. This is now inherently supported by the "Draw Tool"
without any special options required. Each time the user clicks on the map, a new point is added to the plot (or a similar experience with lines when plotting sections). These locations can be redrawn by holding down Ctrl and clicking on the map again. Locations can also be individually toggled or removed via the "Draw Tool" menu.
- Map output - plot from "layer selection": This option can be found under the "Selection Tool"
menu as Extract from map outputs.
- Time-series - selecting channels: The "Selection Tool"
must be active before selecting any times-series features to plot from. This has the benefit being able to be toggled off and then the QGIS selection tool can be used for other tasks without interfering with what is being plotted.
- Time-series plot - show current time: This option can be found under the time-series plot context menu. The vertical time indicator line is also interactable and can be dragged to change the current time.
- Time-series plot - use datetime: This option can be found under the time series plot context menu.
- Secondary axis: Plot items can be moved to the secondary axis by right-clicking the item on the plot and selecting Move to secondary axis. They can be moved back to the primary axis in the same way. This works a little differently from the legacy behaviour where the entire result type was moved to the secondary axis. It is now done by specific plot item, so velocity from one location can be on the primary axis, while velocity from another location can be on the secondary axis.
- Plot navigation: Plot navigation (pan and zoom) is always active in the new TUFLOW Viewer. Use the left mouse button (or middle mouse button) to pan the plot, use the right mouse button to scale the plot, and use the mouse wheel to zoom. For secondary axes, hold down Shift or Ctrl to pan/zoom the secondary axis. Alternatively for secondary axes, the user can interact with the axis ticks directly to pan/zoom the secondary axis (e.g. left click and drag on the axis ticks on the right-hand side to pan the secondary axis up and down).
- Freezing the axis limits: If the plot axes are changed by the user (e.g. panning or zooming), the axes will remain fixed to those limits. The auto limit behaviour can be restored by clicking auto button
in the bottom left of the plot window. Plot limits can also be manually set by right-clicking the plot window and looking under the X axis or Y axis sub-menus (not available for the secondary axis yet). - Exporting data: The export and copy data options are now found under the plot context menu.
4.2.2 Styling¶
- Mesh - saving default style: In the legacy TUFLOW Viewer, it was possible to save the current style to be the default style for the given result type. This is still possible and can be found by right-clicking the mesh layer in the QGIS Layers Panel and selecting the TUFLOW Viewer submenu. The style is cached into a local folder and unlike the legacy viewer, will survive plugin updates.