Difference between revisions of "QGIS TUFLOW Increment Layer"

From Tuflow
Jump to navigation Jump to search
Line 1: Line 1:
This tool can be found in the '''TUFLOW >> Editing >> Increment Selected Layer''' menu item.<br>
+
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.<br>
As the name implies, this tool takes the active layer (as selected in the layer control) and saves a copy of this with a new filename.  The currently open file will be closed and the new version opened, this avoids accidentally modifying the superseded version!<br>
 
The dialogue looks like the below.<br>
 
 
<br>
 
<br>
 +
===Running the Tool===
 +
The tool can be found in the TUFLOW Plugin toolbar, or via the QGIS menu '''Plugins >> TUFLOW >> Editing >> Increment Selected Layer'''.<br><br>
 +
[[File: increment_layer_toolicon.PNG]]<br>
 
[[File:QGIS TUFLOW Increment 03.png]]
 
[[File:QGIS TUFLOW Increment 03.png]]
 
<br>
 
<br>
 
The components are described below.
 
The components are described below.
 
<ol>
 
<ol>
<li>Drop box for selecting the layer to be incremented.  This defaults to the current layer in the layer control.</li>
+
<li> '''Source Layer''' - drop box for selecting the layer to be incremented.  This defaults to the current layer in the layer control.
<li>Keep source formatting. By enabling this checkbox a style .qml will be created from the existing layer and this will be applied to the new layer, so any custom styling will be preserved.</li>
+
<li> '''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).
<li>Output FolderThe 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.</li>
+
<li> '''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.
<li>Output FilenameThe 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.</li>
+
<li> '''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.
<li>Browse.  Use the a file dialogue to set the output folder (item 3 above) and output filename (item 4 above).</li>
+
<li> '''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.
<li>Standard buttons. OK to proceed and Cancel to quit the tool</li>
+
<li> '''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.
 
</ol>
 
</ol>
The tool also checks if an existing file with the name and location specified already exists, if so, an error is displayed and the tool will close.
+
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.
 
+
<br>
 +
<Br>
 +
===Working with GPKG===
 +
''Available since v3.3''<br>
 +
If the source layer is a GPKG, the user will be given an additional option:
 +
* '''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.
 +
* '''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 name when the layer is first selected.
 +
<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]]
 
}}
 
}}

Revision as of 23:18, 5 April 2022

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 an additional option:

  • 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.
  • 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 name when the layer is first selected.



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