QGIS TUFLOW Increment Layer

From Tuflow
Jump to navigation Jump to search

This tool takes the active layer (as selected in the layer control) and saves a copy of this with a new filename. By default the currently open file will be closed and the new version opened, however there is the option to keep both versions open in the workspace. The new layer will adopt the same styling as the old layer.

Running the Tool

The tool can be found in the TUFLOW Plugin toolbar, or via the QGIS menu Plugins >> TUFLOW >> Editing >> Increment Selected Layer.

Increment layer toolicon.PNG
QGIS TUFLOW Increment 03.png
The components are described below.

  1. Source Layer - drop box for selecting the layer to be incremented. This defaults to the current layer in the layer control.
  2. Keep source formatting - Depcrecated - this option is no longer available. The source formatting is now always retained (it also no longer creates a .QML file).
  3. Output Folder - The location for the folder to be saved into. This defaults to the location of the current file and is updated if the Source Layer dropbox is changed.
  4. Output Filename - The output file, the tool will attempt to guess a filename by incrementing the current filename by 1. For example the source layer with name 2d_code_M01_001_R will guess 2d_code_M01_002_R. This will be updated if the Source Layer dropbox is changed.
  5. Move Source Layer to Superseded Folder - This option will move the source layer to a new folder call 'SS' (superseded) once the new incremented layer has been created. This is intended to help users keep their GIS files tidy, with only current layers being present.
  6. Remove/Keep Source Layer in Workspace - This option will determine whether the original source layer is removed from the workspace or not. It is possible to use the option to keep the source layer in the workspace and "Move Source Layer to Superseded Folder" together.

The tool also checks if an existing file with the name and location specified already exists, if so, a warning will appear alerting the user. If the existing layer is open in QGIS (or another GIS program) the tool will produce an error.

Working with GPKG

Available since v3.3
If the source layer is a GPKG, the user will be given additional options:
Note: Save layer out into superseded folder is available since v3.7.0.25

Increment layer spatial database options.PNG
  • Increment Layer Only - this will only save the individual layer from the GPKG database into a new or existing GPKG database. The tool will attempt to increment the name of both the GPKG database and layer when the layer is first selected.
  • Increment Layer and Preserve Database - This option will give the user the ability to determine which layers from the existing GPKG database they would like to keep and/or increment into a new GPKG database. The database can be a new or existing GPKG database. The tool will automatically try and increment the output database and layer names when the layer is first selected.
    • Checked layers will be copied to the new database
    • Layer names can be incremented (or given a new name) by providing one under the "Incremented Layer" column in the table. Otherwise if the "Incremented Layer" cell is blank, the layer will be copied with the same name.
Increment layer spatial database preserve database.PNG


Examples

Example 1 - Shapefile
Increment layer example.gif

Example 2 - GPKG
Increment layer example gpkg.gif

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