Convert TUFLOW Model GIS Format: Difference between revisions

Content deleted Content added
No edit summary
 
(15 intermediate revisions by one other user not shown)
Line 8:
[[File: convert_gis_format_in_panel.PNG]]<Br>
 
'''====Parameters'''<Br>====
=====TCF=====
''<B>TCF</b>''<Br>
Location of an existing TUFLOW model TCF file. This is the TCF of the model that will be converted.<br>
 
''<b>=====Output Vector Format</b>''<br>=====
Output vector format of the converted model. Supported formats are ''GPKG, SHP, MIF''.<br>
 
''<b>=====Output Raster Format</b>''<Br>=====
Output raster format of the converted model. Supported formats are ''GTIFF, GPKG, ASC, FLT''.<Br>
 
''<b>=====Output Profile</b>''<Br>=====
This parameter is only used for GPKG format outputs. GPKG is a database and can store multiple layers inside one file. This option determines how the output GPKG layers will be grouped into databases.<br>
 
Line 37:
Optional parameter specifying the output location of the converted model. By default the output location will a new folder with the same name as the input TCF located in the same folder as the input TCF.<Br>
 
''<b>=====Root Folder</b>''<br>=====
By default the tool will try and find the 'root' folder containing the model files (commonly this folder is named 'TUFLOW'). The tool will try and guess the root folder based on the location of the TCF and the directory structure. If it can't find the root folder, or it picks the wrong folder then this parameter can be used to override this location within the tool.<Br>
 
''<b>=====Scenarios</b>''<br>=====
''Available since v3.6''<Br>
The conversion can be restricted by specifying scenario and event names. Using this option will stop the conversion of layers that are within an 'IF Scenario/IF Event' logic blocks if the scenario name is not provided by the user. This option will also clean the control files and remove unused scenario names. Event names can also be used, however they are only applied to logic blocks in the control files and doesare not used to filter event sources provided in the TUFLOW Event File (.tef).
 
To use this option:
Line 49:
<li> List scenario and event names in the text edit. This should be done in the same manner as TUFLOW batch files e.g. <tt>-s <scenario-name> -e <event-name></tt>. The order does not matter and numbering scenarios is not required, although is accepted (e.g. -s1 -s2).
</ol>
 
=====GPKG Name=====
''Available since v3.7''<br>
Sets the output GPKG database name. Will only be used when outputing to GPKG and using a grouped output profile. If using a 'grouped by control file' profile, then the control file extension will still be added to the name e.g. <output-name>_TCF.gpkg.<Br>
 
=====Write Empty Files=====
''Available since v3.7''<br>
If this option is checked on, the tool will create TUFLOW empty files as part of the conversion. The location of the empty directory will be guessed by the tool unless the user provides a relative path in the <b><tt>Write Empty Files Relative Directory</tt></b> input parameter. The path provided should be a relative path from the model root directory (e.g. commonly this is a folder called "TUFLOW", so a relative path might be <tt>model\gis\empty</tt>). The projection of the empty files will be based on the first <tt>"Projection == "</tt> command found in the TCF. If no <tt>"Projection == "</tt> is found, then empty files will not be created.<Br>
 
=====Output CRS=====
''Available since v3.7''<br>
Forces output files to be in given projection (no reprojection or warping is performed). Useful when converting a model with a combination of SHP and MIF files as these can generate slightly different projection definitions. Set blank to turn off.
 
=====Force TUFLOW Directory Structure=====
''Available since v3.10''<br>
Forces the output files to be placed in a default TUFLOW folder structure, ignoring the input folder structure. If this setting is on, the "Log Folder", "Output Folder", and "Write Check Files" commands will be updated to also reference standard TUFLOW locations.
 
===Checking the Output===
Line 60 ⟶ 76:
A known conversion issue could occur if the tool is converting both MIF and SHP files into a single format (e.g. GPKG) as the projection of these files may be interpreted slightly differently by GDAL (even though they are the same). Users may therefore be required to manually update the projection of the affected files, or add the TUFLOW command "<tt>GIS Projeciton Check == WARNING</tt>" to the TCF. '''Be careful''' to ensure they are in fact the same projection before using this command.<Br>
 
===Python and the SoureSource Code===
It's possible to run the tool outside of QGIS in Python. The tool uses GDAL to read and write the GIS files and does not rely on any QGIS libraries. The source code and instructions on how to run the tool in Python can be found at the following location on the '''<u>[https://gitlab.com/tuflow-user-group/tuflow/model-conversions/convert_tuflow_model_gis_format TUFLOW Community GitLab page]</u>'''.
<Br>