-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deployed b6e72ab with MkDocs version: 1.6.0
- Loading branch information
Showing
4 changed files
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"DynamicLayers","text":""},{"location":"#description","title":"Description","text":"<p>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.</p> <p>You can use some expressions inside the layer datasource template, and then define these variables (from a table or from an input vector source).</p> <p>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.</p>"},{"location":"#installation","title":"Installation","text":"<p>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</p>"},{"location":"#usage","title":"Usage","text":"<p>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.</p>"},{"location":"#configure-layers","title":"Configure layers","text":""},{"location":"#layers","title":"Layers","text":"<p>The project layers are listed in the table, which the following properties</p> <ul> <li>ID : Internal QGIS layer ID (stored in project <code>*.qgs</code> file)</li> <li>Name : The layer name</li> <li>Dynamic Datasource Active : True means the layer is activated : the dynamic datasource content set in the bottom text box will be used when applying variables on the project.</li> </ul> <p>The activated layers have a green background. You can sort the layers in the table by clicking on one of the header columns.</p>"},{"location":"#dynamic-properties","title":"Dynamic properties","text":"<p>This interface allows you to activate dynamic datasource for the selected layers (the layer highlighted in the table above).</p> <p>You can copy the current datasource from the layer definition by clicking on the Copy from current datasource button.</p> <p>Then you can change the datasource, and use QGIS expressions.</p> <p>For example, if the original layer datasource for a Shapefile is</p> <pre><code>/tmp/town_france.shp\n</code></pre> <p>You can use a \"country\" variable</p> <pre><code>'/tmp/town_' + @country + '.shp'\n</code></pre> <p>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 <code>WHERE</code> clause, like this :</p> <pre><code>'service=\\'myservice\\'\nkey=\\'gid\\' table=\"(\nSELECT row_number() OVER () AS gid, *\nFROM mytable\nWHERE year = ' || \"year\" || ')\" sql='\n</code></pre>"},{"location":"#use-variables-in-qgis-layer-properties","title":"Use variables in QGIS layer properties","text":"<p>We have seen above that you can use variables to define a new layer datasource.</p> <p>You can also use variables</p> <ul> <li>Inside the layers title and abstract . Open the vector layer properties dialog, and in the QGIS Server panel, you can use variables in the definition of the title and the abstract properties.</li> <li>In the vector layers field aliases. In the vector properties dialog, tab Fields, you can use variables inside the aliases defined for each field.</li> </ul> <p>When applying variables with the plugin, all these properties will also be updated. (See the \"Set variables\" chapter further on)</p>"},{"location":"#configure-project","title":"Configure project","text":"<p>This tab allows you to define 2 different things:</p> <ul> <li>Some project with QGIS Server : Project title and Project abstract. You can also use variables in these parameters, such as the following example for the title</li> </ul> <pre><code>concat('Map of the towns of ', \"country\", ' (year : ', \"year\", ')')\n</code></pre> <p>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 )</p> <ul> <li>An extent layer and extent margin. When applying the variables on the project, the plugin will zoom to the extent of the selected layer, plus the given margin.</li> </ul>"},{"location":"#set-variables","title":"Set variables","text":""},{"location":"#set-variables-manually","title":"Set variables manually","text":"<p>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.</p> <p>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.</p> <p>This will replace each activated layer datasource by the dynamic datasource modified via the variables, and then zoom to the extent layer.</p> <p>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.</p>"},{"location":"#set-variables-from-a-vector-layer","title":"Set variables from a vector layer","text":"<p>You can use a vector layer as an input for variables. In this case, each chosen layer field will be used as variable name.</p> <p>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.</p> <p>For example, if your source layer has this attribute table</p> id year country 1 2013 Spain 2 2012 France 3 2012 Japan 4 2015 Canada <p>And if you use the expression</p> <p><pre><code>id = 3\n</code></pre> You will have the following variables and values</p> variable value id 3 year 2012 country Japan <p>Once source layer and expression are set, you can apply the found variables on your project by clicking on the button Apply on project</p>"},{"location":"#log","title":"Log","text":"<p>This tab will show the plugin log messages.</p>"},{"location":"#processing","title":"Processing","text":"<p>You can generate projects with a coverage layer :</p> <ol> <li>You need make a first projects with all variables set in the previous plugin dialog.</li> <li>Open the Processing algorithm, from the Processing menu.</li> <li>Do not forget to read tooltips.</li> </ol>"},{"location":"#demo","title":"Demo","text":"<p>Video tutorials:</p> <ul> <li>Plugin presentation</li> <li>Use a vector layer as a variable data source</li> </ul>"},{"location":"#contributors","title":"Contributors","text":"<p>Originally funded by Dyopta, France http://www.dyopta.com/</p>"},{"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":"<ul> <li>Fix some Python errors</li> </ul>"},{"location":"CHANGELOG/#063-2024-08-26","title":"0.6.3 - 2024-08-26","text":"<ul> <li>Fix some Python errors</li> </ul>"},{"location":"CHANGELOG/#062-2024-08-20","title":"0.6.2 - 2024-08-20","text":"<ul> <li>Fix some Python errors</li> </ul>"},{"location":"CHANGELOG/#061-2024-08-20","title":"0.6.1 - 2024-08-20","text":"<ul> <li>Fix some Python errors</li> </ul>"},{"location":"CHANGELOG/#060-2024-08-14","title":"0.6.0 - 2024-08-14","text":"<ul> <li>Support QGIS Expressions</li> <li>Port to QGIS 3</li> <li>Add Processing algorithm to generate many projects in batch</li> </ul>"},{"location":"CHANGELOG/#05-2016-09-08","title":"0.5 - 2016-09-08","text":""},{"location":"CHANGELOG/#04-2015-11-15","title":"0.4 - 2015-11-15","text":""},{"location":"CHANGELOG/#03-2015-11-20","title":"0.3 - 2015-11-20","text":""},{"location":"CHANGELOG/#02-2015-10-06","title":"0.2 - 2015-10-06","text":""},{"location":"CHANGELOG/#01-2015-09-07","title":"0.1 - 2015-09-07","text":""}]} | ||
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"DynamicLayers","text":""},{"location":"#description","title":"Description","text":"<p>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.</p> <p>You can use some expressions inside the layer datasource template, and then define these variables (from a table or from an input vector source).</p> <p>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.</p>"},{"location":"#installation","title":"Installation","text":"<p>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</p>"},{"location":"#usage","title":"Usage","text":"<p>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.</p>"},{"location":"#configure-layers","title":"Configure layers","text":""},{"location":"#layers","title":"Layers","text":"<p>The project layers are listed in the table, which the following properties</p> <ul> <li>ID : Internal QGIS layer ID (stored in project <code>*.qgs</code> file)</li> <li>Name : The layer name</li> <li>Dynamic Datasource Active : True means the layer is activated : the dynamic datasource content set in the bottom text box will be used when applying variables on the project.</li> </ul> <p>The activated layers have a green background. You can sort the layers in the table by clicking on one of the header columns.</p>"},{"location":"#dynamic-properties","title":"Dynamic properties","text":"<p>This interface allows you to activate dynamic datasource for the selected layers (the layer highlighted in the table above).</p> <p>You can copy the current datasource from the layer definition by clicking on the Copy from current datasource button.</p> <p>Then you can change the datasource, and use QGIS expressions.</p> <p>For example, if the original layer datasource for a Shapefile is</p> <pre><code>/tmp/town_france.shp\n</code></pre> <p>You can use a \"country\" variable</p> <pre><code>'/tmp/town_' + @country + '.shp'\n</code></pre> <p>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 <code>WHERE</code> clause, like this :</p> <pre><code>'service=\\'myservice\\'\nkey=\\'gid\\' table=\"(\nSELECT row_number() OVER () AS gid, *\nFROM mytable\nWHERE year = ' || \"year\" || ')\" sql='\n</code></pre>"},{"location":"#use-variables-in-qgis-layer-properties","title":"Use variables in QGIS layer properties","text":"<p>We have seen above that you can use variables to define a new layer datasource.</p> <p>You can also use variables</p> <ul> <li>Inside the layers title and abstract . Open the vector layer properties dialog, and in the QGIS Server panel, you can use variables in the definition of the title and the abstract properties.</li> <li>In the vector layers field aliases. In the vector properties dialog, tab Fields, you can use variables inside the aliases defined for each field.</li> </ul> <p>When applying variables with the plugin, all these properties will also be updated. (See the \"Set variables\" chapter further on)</p>"},{"location":"#configure-project","title":"Configure project","text":"<p>This tab allows you to define 2 different things:</p> <ul> <li>Some project with QGIS Server : Project title and Project abstract. You can also use variables in these parameters, such as the following example for the title</li> </ul> <pre><code>concat('Map of the towns of ', \"country\", ' (year : ', \"year\", ')')\n</code></pre> <p>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 )</p> <ul> <li>An extent layer and extent margin. When applying the variables on the project, the plugin will zoom to the extent of the selected layer, plus the given margin.</li> </ul>"},{"location":"#set-variables","title":"Set variables","text":""},{"location":"#set-variables-manually","title":"Set variables manually","text":"<p>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.</p> <p>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.</p> <p>This will replace each activated layer datasource by the dynamic datasource modified via the variables, and then zoom to the extent layer.</p> <p>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.</p>"},{"location":"#set-variables-from-a-vector-layer","title":"Set variables from a vector layer","text":"<p>You can use a vector layer as an input for variables. In this case, each chosen layer field will be used as variable name.</p> <p>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.</p> <p>For example, if your source layer has this attribute table</p> id year country 1 2013 Spain 2 2012 France 3 2012 Japan 4 2015 Canada <p>And if you use the expression</p> <p><pre><code>id = 3\n</code></pre> You will have the following variables and values</p> variable value id 3 year 2012 country Japan <p>Once source layer and expression are set, you can apply the found variables on your project by clicking on the button Apply on project</p>"},{"location":"#log","title":"Log","text":"<p>This tab will show the plugin log messages.</p>"},{"location":"#processing","title":"Processing","text":"<p>You can generate projects with a coverage layer :</p> <ol> <li>You need make a first projects with all variables set in the previous plugin dialog.</li> <li>Open the Processing algorithm, from the Processing menu.</li> <li>Do not forget to read tooltips.</li> </ol>"},{"location":"#demo","title":"Demo","text":"<p>Video tutorials:</p> <ul> <li>Plugin presentation</li> <li>Use a vector layer as a variable data source</li> </ul>"},{"location":"#contributors","title":"Contributors","text":"<p>Originally funded by Dyopta, France http://www.dyopta.com/</p>"},{"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":"<ul> <li>Improve UI</li> <li>Fix the update in Lizmap configuration file</li> </ul>"},{"location":"CHANGELOG/#064-2024-08-28","title":"0.6.4 - 2024-08-28","text":"<ul> <li>Fix some Python errors</li> </ul>"},{"location":"CHANGELOG/#063-2024-08-26","title":"0.6.3 - 2024-08-26","text":"<ul> <li>Fix some Python errors</li> </ul>"},{"location":"CHANGELOG/#062-2024-08-20","title":"0.6.2 - 2024-08-20","text":"<ul> <li>Fix some Python errors</li> </ul>"},{"location":"CHANGELOG/#061-2024-08-20","title":"0.6.1 - 2024-08-20","text":"<ul> <li>Fix some Python errors</li> </ul>"},{"location":"CHANGELOG/#060-2024-08-14","title":"0.6.0 - 2024-08-14","text":"<ul> <li>Support QGIS Expressions</li> <li>Port to QGIS 3</li> <li>Add Processing algorithm to generate many projects in batch</li> </ul>"},{"location":"CHANGELOG/#05-2016-09-08","title":"0.5 - 2016-09-08","text":""},{"location":"CHANGELOG/#04-2015-11-15","title":"0.4 - 2015-11-15","text":""},{"location":"CHANGELOG/#03-2015-11-20","title":"0.3 - 2015-11-20","text":""},{"location":"CHANGELOG/#02-2015-10-06","title":"0.2 - 2015-10-06","text":""},{"location":"CHANGELOG/#01-2015-09-07","title":"0.1 - 2015-09-07","text":""}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.