After I created many of vector grid layers, I now need to style them in a batch system. Is there any way to do this?

If that is not possible, how can I use the layer duplicate option to inherit the style from the original grid; and then change the extents of the duplicated layer?

  • What you mean by "change the extents"? – mapsir Feb 10 '14 at 11:33
  • @mapsir When you create a polygon vector grid, you have to assign the extents, then after you save the layer, you can't change the extents using the properties of the layer, is that possible? – MRAN Feb 10 '14 at 17:46
  • In QGIS when you add more features to a shapefile, it automatically calculate and set the extents. – mapsir Feb 11 '14 at 4:03
  • @mapsir I need to change the extents, not adding more features. – MRAN Feb 11 '14 at 7:36
  • In a web application you can set a desired extent for viewing a vector, but I think we can not change the extent of a vector layer in QGIS. – mapsir Feb 11 '14 at 7:50

If you want to batch style your layers you may select the source layer, right click on it and choose Copy Style.

Then select your target layers keeping the Ctrl key pressed.

Eventually, go to the Layer menu and choose Paste style.

I've noticed that the Paste style menu is activated only when the target layers are similar to the source layer.

enter image description here


You can easily paste your copied style in a text editor, using Ctrl+V to study it.

Or you can save the initial layer style in the .qml or .sld file format, in a separate folder called QGIS styles, for example.

Then, when you create a new layer, just browse the QGIS styles folder for a convenient style. This way, styling will become an integrated part in the new layer creating process.

A better approach, especially in a medium with more developers involved, you can save/load your layers' styles directly in/from the database:

enter image description here

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