7

I would like to save my attributes selection as a layer. I have read on other posts to do it by selecting the layer with the attribute selection, then right clicking on it and choosing "save selection as...". However, by right clicking on the layer with selected attributes, there is no "save selection as..." in my case.

enter image description here

How can I save/export the attribute selection as a new file?

Taras
  • 32,823
  • 4
  • 66
  • 137
user1607
  • 343
  • 1
  • 4
  • 16

2 Answers2

9

For QGIS 2.x versions

You are doing fine, but just need to go to next step.

enter image description here

Tick on Save only selected features.

Taras
  • 32,823
  • 4
  • 66
  • 137
Kazuhito
  • 30,746
  • 5
  • 69
  • 149
  • I get "Creation of layer failed (OGR error: Attempt to create csv layer (file) against a non-directory datasource.)" The features are from a PostGIS database. – chris Aug 29 '18 at 21:10
2

For QGIS 3.x versions

Let's assume there is a polygon layer called 'grid' with its corresponding attribute table, see image below.

input

Select a feature (or features) that has (have) to be saved/exported.

selection

And then by beans of RMB over the layer 'grid' use Export > Save Selected Features As...

enter image description here


References:

Taras
  • 32,823
  • 4
  • 66
  • 137