Tools for simplifying and automating common tasks for national parks and other protected areas.
Although fully functional, this plugin has not yet been polished for release to the official QGIS plugin repository.
You can install the latest version of the plugin from Lutra Consulting public repository:
https://qgis.lutraconsulting.co.uk/lutraconsulting/plugins.xml
Please note this plugin has been developed for very specific use cases and as such may require further work to make it more generic to suit users' wider requirements. Please feel free to create GitHub issues for reporting any bugs, queries or feature requests.
Tools can be configured from within QGIS via Plugins Menu > Project and Template Selector > Configure Project and Template Selector.
The Project Selector simplifies project selection on QGIS startup by presenting the user with a number of grouped projects:
The Projects Folder configuration option should point to a folder with a structure like this:
- top-level container folder
- Environment (folder)
- EIAs.qgs
- Planning (folder)
- Highways.qgs
- Planning Applications.qgs
- default.txt
- Environment (folder)
QGIS project files (.qgs files) are grouped into folders. Folder names are used to populate the Project Groups drop-down menu. A file called default.txt
placed under a group folder can be used to influence the default selected project. Within default.txt
specify the name of the default project (case sensitive, '.qgs' suffix optional).
The Template Selector simplifies the process of selecting and configuring QGIS print layout templates (.qpt files) and provides a dialog like this:
The Folder Containing Templates configuration option specifies the path to a folder containing the .qpt files. The folder structure should look similar to the example below:
- top-level container folder
- Planning Application
- A4L.qpt
- A4P.qpt
- A3L.qpt
- images (folder)
- logo.gif
- Copyrights (folder)
- Ordnance Survey.txt
- Aerial 2010.txt
- default.txt
- Environmental Impact Assessment
- ... (similar folder content to previous example
- Planning Application
The names of the folders under the top-level container folder (e.g. Planning Application) are used to identify the type of print layout template (see image above).
In the example above the Planning Application template is available as A4 (Landscape and Portrait) and A3 (Landscape). All ISO A series sizes are supported.
In this case the optional images folder contains any logos or other images referenced by the associated .qpt files.
The optional Copyrights folder contains the copyright text(s) available when using the Planning Application layout template. default.txt can optionally be used to specify the default copyright text for the template. This is configured as described above for the Project Selector.
Whether or not to show the project selector dialog on QGIS startup - note that this dialog does not appear if QGIS is invoked directly on a project (.qgs) file.
You may be using Moor Tools as part of a wider QGIS deployment. In this case you may wish to override the destination URL of the Help button with your own content. This can be achieved by altering the definition of helpUrl
towards the bottom of templateselectordialog.py in the plugin source files.
This section describes how to create effective layout templates.
Template Selector supports automatic replacement of strings in addition to those already supported by QGIS. The following strings will automatically be replaced within layout templates labels:
- [username] : the user's username (e.g. %USERNAME%), specified as environment variable
- [author]: the user's username + compilation date info
- [title] : The Title specified by the user in the above dialog
- [subtitle] : The Sub-title specified by the user in the above dialog
- [copyright] : The content of the selected copyright file
Templates with multiple layout maps are supported. Composer maps are identified by their Item ID property wherever present and their scales can be set independently.
You may wish to highlight specific points on interest in your maps:
This can be achieved as follows:
- Create a new (point) layer describing your points of interest
- The example above included a field called 'label'
- Digitise your points of interest and add label values as required
- Style and label the layer as you wish it to appear in the print layout
- The example above uses a red cross and associated label with buffer
- Choose a compatible template (these are explained below)
- The POI Layer options should now become active
- Select the points of interest layer and appropriate label field name
The resulting print layout output should show the grid references for the points of interest.
Creating compatible templates is easy, simply:
- Add a label to the template
- Under its Item Properties, set the Item ID property to gridref
This label will be automatically updated with grid references of points of interest.
This can happen when references to files used in print layout templates have been saved using relative paths.
This can be resolved by:
- QGIS > Project Properties > General tab > Save paths > absolute
- Re-saving the layout template
Alternatively the .qpt file can be edited by hand to specify the absolute path to referenced files.