30

I'm working on bulk data. I have a few hundred GeoTIFF images imported into a QGIS project, and I'd like to modify their layer properties - things like the no-data-value, transparency of certain pixel values, colour map assignments...

But I can't seem to find a way to apply these changes to several layers at once, short of editing the XML file with a global search-and-replace. Is there a way to do this using the GUI?

44

In current versions of QGIS, you can use Copy Style and then Paste Style from the Layers top dropdown menu (if you have one or more layers selected in the layers list).


For some older versions: You can select multiple layers in the layers list, right-click and use Paste Style from the context menu.

For other older versions:

The MultiQML plugin lets you apply one QGIS layer style to multiple layers at once. I think that's as close to what you are looking for as currently possible.

7

If you save the style options for the one vector layer as a .qml file, you can apply it onto multiple layers at once with the MultiQML-plugin. Basically, it's an interface window that lets you select which layers you want the style to apply to (by hand, or 'select all'), the 'apply style' button lets you select the qml with the style info.

Info to be found here: MultiQML

3

This works for QGIS 3.4 =>

  1. Create a group of all the layers you want to have the same style
  2. Edit the style of one of the layers in the group to your liking
  3. Right-click the correctly styled layer; 'Styles' -> 'Copy Style' -> 'Symbology'
  4. Select the group you created before
  5. Right-click the group; 'Paste Style'
2

You can save your project, close QGIS, find the style definition in the .qgs file of your project then paste it for every layers.

1

I wrote a python script that could be useful if you want to apply style to all layers in a group or more. All you need to have is a saved .qml file with the properties you want to apply for each type of layer. https://github.com/BC14w/applystyle_group/blob/master/loadstyle

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.