20. TUFLOW Viewer Roadmap¶
Although the new TUFLOW Viewer already has many of the core functionalities implemented, there are still several features and tools from the legacy TUFLOW Viewer that have not been ported across yet. The following roadmap outlines the planned features and improvements for future releases of the TUFLOW Viewer tool. This roadmap is focused on the features that are currently missing compared to the legacy TUFLOW Viewer and does not include all potential new features. This roadmap is subject to change and may be updated as development progresses.
The order of the features listed below is loosely based on priority, with higher priority features listed first. However, the actual implementation order may vary based on development considerations.
20.1 Export Animation Tool¶
This is probably the highest priority feature missing from the new TUFLOW Viewer as it is a commonly used tool in the legacy viewer and an important part of a deliverable workflow.
In the meantime, if plots are not required for the animation, it is possible to export an animation in the main map window using the QGIS temporal controller. In the linked video, a GIF is created, however if a .mp4 or other video format is preferred, FFmpeg can be used convert image sequences to video files. Indeed, this is how the legacy TUFLOW Viewer created animations. FFmpeg is similar to a TUFLOW utility and can be executed via a batch file. An example command is provided below for modification:
ffmpeg.exe -framerate 10 -i animation_export_%04d.png -c:v libx264 -pix_fmt yuv420p -movflags +faststart output.mp4
Note: The above command works directly in the CMD or PowerShell, but if using a batch file, the % will need to be escaped using %% so the output file should be animation_export_%%04d.png if using a batch file.
Some of the customisable or important parts of the command are explained below:
-framerate 10specifies the frame rate of the output video (10 frames per second in this case).-i animation_export_%04d.pngspecifies the input image sequence, where%04dis a placeholder for a four-digit frame number (e.g.,0001,0002, etc.). Make sure this matches the exported image filenames as shown below in the Template field:
output.mp4is the name of the output video file.- Another important aspect is to make sure the image width and height are divisible by 2, otherwise FFmpeg may throw an error. These settings can be adjusted in the export animation dialogue in QGIS (these fields can be seen in the above image).
20.2 Flux Tool¶
The new TUFLOW Viewer uses PyTUFLOW to read and extract data from results, and currently flux is not supported in PyTUFLOW. It is planned to add this support in both PyTUFLOW and TUFLOW Viewer. It is most likely going to be calculated slightly differently where it will use the q map output data type rather than the d and v data types as done in the legacy viewer. The depth and velocity data work OK for flat cells, and is almost guaranteed to be present in most results (which is why it was originally chosen). However, as sub-grid sampling has been introduced in TUFLOW, this becomes less accurate. So, it is recommended to start adding the q map output data type to model outputs!
20.3 Plot Customisation¶
Currently, there is very little support for plot customisation i.e. legends, axis labels, titles, custom colours etc. Plot customisation can be quite complex to implement for an interactive and dynamic plotting tool, as settings need to survive plot redraws and updates. It is planned to add some basic customisation options in future releases, with more advanced options to be added later on.
It is also planned to add the ability to access a given plot via the Python console so that users can customise the plot using pyqtgraph directly. This will allow the maximum amount of customisation, albeit with some Python knowledge required.
20.4 User Plot Data¶
This will most likely be implemented in a similar way to the legacy viewer with a few tweaks to make it more in keeping with how the new viewer works. It is also planned to be setup in a way that allows different plot types in the future e.g. bar charts for representing rainfall hyetographs.
20.5 Plot Statistics¶
This is predominately in relation to extracting median and mean plot data for Australian Rainfall & Runoff (ARR) design storms. It is also planned to set this up such that other statistics can be extracted from the plot in the future as well.
20.6 Particles¶
The legacy TUFLOW Viewer supported the visualisation of particles from the TUFLOW FV particle tracking module. This functionality is planned to be ported across to the new TUFLOW Viewer in the future.
20.7 Batch Exporting Plots¶
The ability to batch export plot (as images or raw data) from multiple locations is planned to be added in the future.