[GIS] Save multiple selection sets in QGIS

qgisselect-by-attributetools

I'm looking for a feature in QGIS but I am not sure if it exists.
I don't know the name of such feature, but I call it multiple selection sets. It exists in TransCAD and I find it very useful. It basically allows one to save the selected features under a name, and have multiple sets that one can compose (union, intersection, difference, etc).
I am under the impression that QGIS allows only to save the selected set as a new file, which is not what I am looking for.
Does it exists in QGIS? How can one use it? If not, is there a work-around?

Best Answer

Method 1 - New Memory Layer plugin

With some steps, you can create a memory layer from your selection.

  1. Install New Memory Layer plugin;
  2. Add a new memory layer into your project in Layer > New > New Memory Layer;
  3. Select the same geometry type and CRS as your original layer;
  4. Make your original layer active, create your desired selection and copy the features (Edit > copy features or CTRL+C);
  5. Make your memory layer active and editable;
  6. Add the necessary new attributes with the same name and type as the original layer
  7. Paste the features (Edit > paste features or CTRL+V)

Method 2 - Using Processing toolbox (> QGIS 2.2)

Using processing toolbox, this is pretty straightforward.

  1. Make your original layer active, create your desired selection;
  2. If it's not yet done, open Processing toolbox in Processing > Toolbox;
  3. Find the "Save selected features (QGIS algorithms > Vector general tools);
  4. Use your original layer as input and leave the "Save as temporary layer" as output.

Note: Beware that all temporary or memory layers will be lost if the project is closed. So make sure to save them before you do.

Related Question