1

I'm using QGIS 3.4 for this, and am creating a map that will see quite a lot of use. It will show plant species, and the area of the plants in question.

For this, we have a main "plant" table. This contains all the plants, their species, and their area. Which sounds easy enough.

However, we are going to be filtering on the "plant" table to generate specific maps (eg "Plantation"=31). There are also 50+ species of plants, so what I'd ideally like is to have a legend which will update itself as to what species are being shown, along with their symbology, and also their summed area.

Any idea how best to go about this? I've tried using virtual layers but keep running into issues. Maybe using an Atlas? Or if there's a way to "carry over" the symbology into a table on the layout (that one would make it sooo much easier).

  • Are you referring to the map composer of QGIS or do you have a different configuration like qgis server of dynamically creating maps with code? – vagvaf Jul 16 at 8:22
  • 1
    Try using an atlas. For the legend, choose the option to "only show items inside current atlas feature." If you need to make a more complicated output, you could try making a print Report with a Field Group Section. That feature isn't very well documented, but it sounds like it might have more options. – csk Jul 16 at 16:56
2

You could use the query builder found under 'provide feature filter' when you right-click on your layer > properties > source.

Depending on what planet species you'd like to show on the map each time you could use the query builder to define this so that only that species shows. Without seeing your data I've done a quick example below.

enter image description here

By then selecting 'only show items inside current atlas' followed by the 'filter' button your legend should then be dependant on the query you built earlier.

enter image description here

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.