3

I often need to duplicate a vector layer, creating new data source (shapefile) files so that I can then delete some features in the duplicate layer without deleting them in the original data. I need to retain all of the formatting settings, etc. as I do this. I have been using "save as" (after right-clicking on the layer to be duplicated), but then need to go through and format the symbol, labels, etc.. Is it possible to do this while retaining the formatting settings?

2 Answers 2

7

Most (styling) settings can easily be copied from an existing layer to e.g. duplicates, which seems the best option here. Works quite like copy-paste, in the layer window

  • right-click the (style) source layer -> styles -> copy style
  • right-click the target layer(s) -> styles -> paste style


There are other options involving different layer- or symbology definition files, check both answers for this question for a few examples (it´s an old post but covers two common other options).

3

Together with saving the new shapefile, you can also save the style (Layer Properties->Style tab then click the Style button). If you save the style using the name of the new, duplicated layer, it will be applied automatically when you next open the duplicate shapefile.

1
  • Good to note that this saves a layername.qml file which stores the style, QGIS automatically applies any qml files that have the same name as the shapefile. Commented Jan 29, 2018 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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