2

I have a project with several layers and a specific styling for each one. In a similar project I have similar layers which need to be stlyed the same way.

I could copy the style of one layer in my first project and paste it to the corresponding layer in the second project. But it takes a lot of time to do this for many layers.

Perhabs there is a way to copy the styles of several layers in the first project and paste it again to several layers in the second one? Any ideas if this is somehow possible?

For example:

enter image description here

I would like to copy the styles of the Layers "Landnutzung; Schadenspotenzial; Gefährdung" and paste to the corresponding layers all at once. I want to create one Style document for all three Layers and use it for the other three Layers only once.

I hope it's clear what I mean.

2
  • Related post If you are using Shapefile, just put the QML with the other Shapefile files, the style will be automatically applied when loading the layer – JGH Apr 20 '20 at 14:26
  • related post Simplify importing/applying a QML – JGH Apr 20 '20 at 14:29
1

You have three options (as far as I know):

  1. Save styles as .qml (style tab -> symbology -> style dropdown at the bottom left). Load the same way in the other project.
  2. Save styles to an .xml (style tab -> symbology -> style managing (red circle, green square, blue line next to an a at the left middle)) - this does not transfer labels and attribute formulas. Load the same way in the other project.
  3. Save layers to a layer definition file (right click a layer or a group -> export). This includes all style choices, but also the layers themselves. Basically this creates an excerpt of your project. Load by drag & drop.
5
  • But with the .qml file I need to create a file for each layer in project 1 and load the style to each layer in project 2. It would work of course but I'm looking for a solution to copy the styles of several layers and paste them to several layers in "one move" – DGIS Apr 20 '20 at 13:49
  • Are the layers with the same symbology different files @DGIS? – Erik Apr 20 '20 at 14:14
  • yes, they are different shape files. – DGIS Apr 20 '20 at 14:24
  • Then the xml-solution is probably your best go. You'll still have to change every layer manually. – Erik Apr 20 '20 at 14:41
  • If you have many others projects to do the same, I recommend you to code it. Or you can try to find a complement. This could help you to code: gis.stackexchange.com/questions/220826/… – MarceloBaliu Jul 19 '20 at 5:43

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.