Difference between revisions of "QGIS TUFLOW Increment Layer"

From Tuflow
Jump to navigation Jump to search
Line 26: Line 26:
 
* '''Increment Layer Only''' - this only saves the individual layer from the GPKG database into a new or existing GPKG database. Other layers in the GPKG will not be copied.
 
* '''Increment Layer Only''' - this only saves the individual layer from the GPKG database into a new or existing GPKG database. Other layers in the GPKG will not be copied.
 
* '''Increment Layer and Preserve Database''' - this option allows the user to increment or copy multiple layers from the same GPKG into a new or existing GPKG.
 
* '''Increment Layer and Preserve Database''' - this option allows the user to increment or copy multiple layers from the same GPKG into a new or existing GPKG.
* '''Save Layer Out Into Superseded Folder''' - this saves the currently selected layer into a new location but does not open it in QGIS. This option allows users to use centralised databases without having to increment the entire database each time. The user saves the soon to be superseded layer into a new location for prosterity and continues to work with the layer in the centralised database.<Br>
+
* '''Save Layer Out Into Superseded Folder''' - this saves the currently selected layer into a new location but does not open it in QGIS. This option allows users to use centralised databases without having to increment the entire database each time. The user saves the superseded layer into a new location for posterity and continues to work with the layer in the centralised database.<Br>
  
  

Revision as of 18:41, 28 February 2023

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

A summary of the options is described below and more details are given further on:

  • Increment Layer Only - this only saves the individual layer from the GPKG database into a new or existing GPKG database. Other layers in the GPKG will not be copied.
  • Increment Layer and Preserve Database - this option allows the user to increment or copy multiple layers from the same GPKG into a new or existing GPKG.
  • Save Layer Out Into Superseded Folder - this saves the currently selected layer into a new location but does not open it in QGIS. This option allows users to use centralised databases without having to increment the entire database each time. The user saves the superseded layer into a new location for posterity and continues to work with the layer in the centralised database.


  • 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