QGIS TUFLOW Import Empty

From Tuflow
Jump to navigation Jump to search

When working with GIS files in TUFLOW different model have inputs require different attributes. For example a initial water level layer (2d_iwl) layer only requires a single attribute (which is the initial water level value), whilst a 1d channel layer (1d_nwk) has a number of attributes including channel type, channel roughness, upstream and downstream elevation. These are created by running TUFLOW with the Write Empty GIS Files == <location> command, when working in QGIS this can also be completed with the Create TUFLOW Project utility.

Running the Tool

The tool can be found in the TUFLOW Plugin toolbar, or via the QGIS menu Plugins >> TUFLOW >> Import Empty File
Import empty file toolicon.PNG
QgisTuflow ImportEmpty02.JPG

Inputs:

  1. Empty Directory - the location that contains the empty (template) files. This is determined based on the directory set in the Create TUFLOW Project tool. Alternatively the empty path could have been saved by the "Save directory to Project" or "Save directory to Global".
  2. Empty Types - the empty types to be imported. Multiple file types can be specified together. More information is given for the empty files in the "Tool Tip" with further information obtainable by using the provided links to the TUFLOW Manual and the TUFLOW Wiki.
  3. Run ID - the name of the output file. The output file name uses the following convention - <empty_type>_<Run_ID>_<geometry_type><file_ext> - e.g. 1d_nwk_runID_L.shp
  4. Geometry Type - the geometry type of the imported layer. Different datasets in TUFLOW will use different geometry types, for example the active and in-active model areas are defined by region (polygon) objects. In this section you can chose the geometry types to use, multiple types can be selected.
  5. Save directory to Project - saves the empty directory to the QGIS project (.qgs/.qgz). This saves the location the next time this tool, or the "Insert TUFLOW Attributes to Existing Layer" tool, is opened inside this project. A similar option is available in the "Insert TUFLOW Attributes to Existing Layer" tool which will also affect this tool.
  6. Save directory to Global - saves the empty directory globally for all QGIS workspaces. If a directory has been saved to the project (see above), the project directory location will take precedence over the global location. This location will save the empty directory for this tool and the "Insert TUFLOW Attributes to Existing Layer" tool, conversely the "Insert TUFLOW Attributes to Existing Layer" tool has a similar option that will affect this tool.
  7. Spatial Database Options - Available in v3.3
    1. Convert to GPKG - this will convert the imported format to a GPKG even if the empty file format is not a GPKG
    2. GPKG export options - dictates where and how the GPKG files are saved. This will apply to files if the above option (Convert to GPKG) is checked or the empty file format is a GPKG
      • Separate - saves all imported types into separate GPKG databases. The database name and layer name will be identical e.g. 1d_nwk_runID_L.gpkg and layername = 1d_nwk_runID_L
      • Group geometry types - Similar to "Separate" except will remove the geometry type identifier from the GPKG database name and will group geometries together e.g. 2d_zsh_runID.gpkg and layernames = 2d_zsh_runID_L, 2d_zsh_runID_P
      • All to one - saves all the imported layers into a new or existing GPKG database. The output directory can be specified by the user, or if none is specified the tool will use similar rules as "Group geometry types" and use the first empty type it saves as the database for all layers.

Note: Not all geometries are valid for all empty types. For example 2d_code layers are always regions and no point / line template is provided. Other datasets such as the 2D topography modifier (2d_zsh) format is valid for all three types.

Note 2: since v3.3, the tool also accepts GPKG empty files. Prior to this, GPKG empty files will not be displayed in the "Empty Type" list.

Example

Import empty file.gif

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