This QGIS V3.x Processing algorithm loads/saves multiple styles in qml's to/from a QGIS layer. The styles are saved as sidecars in the same directory of the layer file, by default. Loading styles can be done from the sidecars or from a directory.
Distributed under the GPL licence
This algorithm will NOT work on QGIS ≤ 2.99.
For QGIS ≥3.x
Contents
See here for installation instruction.
Note that in order to work correctly, this algorithm could require write rights to the directory the layer file resides in, because, by default, the .qml files are created as sidecars of the layer file.
Once successfully installed the algorithm is found in the Processing toolbox under GeoProc -> layers -> Multi-styles:
Double-click "Multi-styles" to launch the configuration window.
Five fields are presented:
Styles are saved in qml's following this standard: layerName_styleName.qml
Where: layerName is the same name as the layer the qml relates to.
styleName is the name of the style given in Style Manager.
If Save is True each layer's style is saved to its own qml.
If Save is False (default) qml's are read from files and added to the layer's Style Manager.
Then, if Force load is False, only sidecar qml's following the above naming convention are loaded. Otherwise all qml's in the directory are loaded, if possible.
NOTE
If one of the styles is named 's', then there is a problem! This is because the algorithm is created for geophysics workflows where the suffix '_s' is appended to sunshaded grid of product of the same name.
On completion, a report file (html) is created listing the operation results. Click on the "File path" link from the Result Viewer to open the report. This report tells you if the processing has been successful or not for each qml processed.
Published date: 13 Jun 2019.