From 0f2880d535ca61d00f685b5d885b5109fd2ffa0f Mon Sep 17 00:00:00 2001
From: 3Liz Bot Changelog#
Unreleased#
+0.6.5 - 2024-08-29#
+
+
0.6.4 - 2024-08-28#
Once source layer and expression are set, you can apply the found variables on your project by clicking on the button Apply on project
"},{"location":"#log","title":"Log","text":"This tab will show the plugin log messages.
"},{"location":"#processing","title":"Processing","text":"You can generate projects with a coverage layer :
Video tutorials:
Originally funded by Dyopta, France http://www.dyopta.com/
"},{"location":"CHANGELOG/","title":"Changelog","text":""},{"location":"CHANGELOG/#unreleased","title":"Unreleased","text":""},{"location":"CHANGELOG/#064-2024-08-28","title":"0.6.4 - 2024-08-28","text":"This plugin helps to change the datasource's of many layers at once, for example to create different versions of the same project on different extents.
You can use some expressions inside the layer datasource template, and then define these variables (from a table or from an input vector source).
Finally, you can apply the variables values on every configured layer via the apply button, and you can see the changes before saving the project.
"},{"location":"#installation","title":"Installation","text":"For now, the plugin is not published on QGIS.org. You need to download a ZIP either from a stable release or from a commit
"},{"location":"#usage","title":"Usage","text":"At first, you must set up a QGIS project with some layers. This project will serve as a basis to create derived child projects. Once you have a project, you can open the plugin main dialog.
"},{"location":"#configure-layers","title":"Configure layers","text":""},{"location":"#layers","title":"Layers","text":"The project layers are listed in the table, which the following properties
*.qgs
file)The activated layers have a green background. You can sort the layers in the table by clicking on one of the header columns.
"},{"location":"#dynamic-properties","title":"Dynamic properties","text":"This interface allows you to activate dynamic datasource for the selected layers (the layer highlighted in the table above).
You can copy the current datasource from the layer definition by clicking on the Copy from current datasource button.
Then you can change the datasource, and use QGIS expressions.
For example, if the original layer datasource for a Shapefile is
/tmp/town_france.shp\n
You can use a \"country\" variable
'/tmp/town_' + @country + '.shp'\n
You can use as many variables as needed, and for any type of datasource. For example, you could change a username or table definition of a PostGIS layer, or a WHERE
clause, like this :
'service=\\'myservice\\'\nkey=\\'gid\\' table=\"(\nSELECT row_number() OVER () AS gid, *\nFROM mytable\nWHERE year = ' || \"year\" || ')\" sql='\n
"},{"location":"#use-variables-in-qgis-layer-properties","title":"Use variables in QGIS layer properties","text":"We have seen above that you can use variables to define a new layer datasource.
You can also use variables
When applying variables with the plugin, all these properties will also be updated. (See the \"Set variables\" chapter further on)
"},{"location":"#configure-project","title":"Configure project","text":"This tab allows you to define 2 different things:
concat('Map of the towns of ', \"country\", ' (year : ', \"year\", ')')\n
You can use the button Copy properties from project to get the title and description which are set in the project properties tab of QGIS ( Menu Project / Project properties / QGIS Server )
You can add or remove variables in the table by using the form at the bottom. You can also modify the variable value by entering a new value in corresponding the table cell.
Once you have added your variables and added a value for each one, you can apply variables on project by clicking on the corresponding button.
This will replace each activated layer datasource by the dynamic datasource modified via the variables, and then zoom to the extent layer.
You can now save the project as another project, or simply save the current project. All the configuration is stored in the QGIS project, so you can reuse it in the future.
"},{"location":"#set-variables-from-a-vector-layer","title":"Set variables from a vector layer","text":"You can use a vector layer as an input for variables. In this case, each chosen layer field will be used as variable name.
You must then use a QGIS expression to filter one line of the source layer. If more than one line is returned by the expression filter, the first feature will be used.
For example, if your source layer has this attribute table
id year country 1 2013 Spain 2 2012 France 3 2012 Japan 4 2015 CanadaAnd if you use the expression
id = 3\n
You will have the following variables and values variable value id 3 year 2012 country Japan Once source layer and expression are set, you can apply the found variables on your project by clicking on the button Apply on project
"},{"location":"#log","title":"Log","text":"This tab will show the plugin log messages.
"},{"location":"#processing","title":"Processing","text":"You can generate projects with a coverage layer :
Video tutorials:
Originally funded by Dyopta, France http://www.dyopta.com/
"},{"location":"CHANGELOG/","title":"Changelog","text":""},{"location":"CHANGELOG/#unreleased","title":"Unreleased","text":""},{"location":"CHANGELOG/#065-2024-08-29","title":"0.6.5 - 2024-08-29","text":"