4

My layer has more than 2900 elements, and I would like to release a map with 1 or 10 or 50 selected elements but never 2900 in the time.

I can't select them other than visually (no column to identify). Do you have an idea to output a report with only the selected elements?

I have tried the different solutions already seen on this site but nothing that allows me to release a report without saving many unnecessary layers.

3

If you are using QGIS 3.x, try the following steps:

  1. Use the Field Calculator to create a new virtual field (integer type), called selected, and enter the expression is_selected()
  2. Go to your Map Layout and under the Atlas settings enter the expression "selected" = 1
  3. Now select your features on the main canvas
  4. Go back to the Map Layout and enable the atlas (disable first if already enabled) to refresh the filter.

Just keep cycling between 3 and 4 every time you want to select a different set. You don't have to call the virtual field selected; it can be anything you want. Just make sure you then refer to its name in step 2.

Note: I have tried directly entering is_selected(@atlas_feature) (and variants) in the Atlas Filter and it didn't seem to work (Q 3.6)

Note also that the Virtual Field does not auto update in an open Attribute Table - you need to open a new table to confirm the updated values.

This won't work in QGIS 2.x as is_selected() is not available.

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.