Difference between revisions of "QGIS TUFLOW Import Empty"
Ellis Symons (talk | contribs) |
|||
(6 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | 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 <tt>Write Empty GIS Files == <location></tt> command, when working in QGIS this can also be completed with the '''<u>[[QGIS_TUFLOW_Create_Project | | + | 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 <tt>Write Empty GIS Files == <location></tt> command, when working in QGIS this can also be completed with the '''<u>[[QGIS_TUFLOW_Create_Project | Create TUFLOW Project]]</u>''' utility. |
<br><br> | <br><br> | ||
===Running the Tool=== | ===Running the Tool=== | ||
Line 7: | Line 7: | ||
<br> | <br> | ||
<br> | <br> | ||
− | ''' | + | '''Inputs''': |
− | + | <ol> | |
+ | <li> '''Empty Directory''' - the location that contains the empty (template) files. This is determined based on the directory set in the '''<u>[[QGIS_TUFLOW_Create_Project | Create TUFLOW Project]]</u>''' tool. Alternatively the empty path could have been saved by the "Save directory to Project" or "Save directory to Global". | ||
+ | <li> '''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 <u>[https://docs.tuflow.com/classic-hpc/manual/latest/ TUFLOW Manual]</u> and the TUFLOW Wiki. | ||
+ | <li> '''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 | ||
+ | <li> '''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. | ||
+ | <li> '''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. | ||
+ | <li> '''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. | ||
+ | <li> '''Spatial Database Options''' - ''Available in v3.3'' | ||
+ | <ol> | ||
+ | <li> '''Convert to GPKG''' - this will convert the imported format to a GPKG even if the empty file format is not a GPKG | ||
+ | <li> '''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. | ||
+ | </ol> | ||
+ | </ol> | ||
+ | '''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.<br> | ||
+ | <Br> | ||
+ | '''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. | ||
<br> | <br> | ||
− | + | <Br> | |
− | + | ===Example=== | |
− | + | [[File: Import empty file.gif]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | [[File: | ||
− | |||
<br> | <br> | ||
+ | <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]] | ||
}} | }} |
Latest revision as of 10:01, 23 September 2024
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
Inputs:
- 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".
- 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.
- 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
- 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.
- 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.
- 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.
- Spatial Database Options - Available in v3.3
- Convert to GPKG - this will convert the imported format to a GPKG even if the empty file format is not a GPKG
- 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
Up |
---|
Back to TUFLOW QGIS Plugin Main Page |