Feature #4970
Ability to filter what layers are shown on a map
| Status: | Rejected | Start Date: | 02/08/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | - | Spent time: | - | |
| Target version: | - | |||
| Patch supplied: | No |
Description
Situation - you have a projects with 20 locations (sites) you would like to make maps for. On each map you only want to show data relevant to that site. So for instance I have 20 sites. I only want to show on each map data that is relevant to that site.
So say for each site I only wanted to show the site point, a 500m and 1000m buffers related to that site on each map. The sites are close together so the buffers from the other sites show up on the other sites maps which is something I would like to avoid.
So my suggestion is that if my layers were prefixed with a code for a site (say S1 for site one, S2 for site 2) could the plugin work out which layers to turn on and off for that map based on a field in the coverage locations table that had those codes in it?
History
Updated by Vincent Picavet over 1 year ago
I see two ways of implementation, don't know which suits best your use case :
- for every layer in the template map, add a "coverage" field, containing the id of the relevant coverage. When generating maps, we filter the layers on this field to only output features with the id of the current drawn coverage.
- for every coverage item, add a "layers" field, with comma-separated list of layers to display for this particular coverage
It's not exactly the same way of handling the feature, both could be complementary as well.
Updated by James Stott over 1 year ago
I think either would work.
I think maybe the 2nd option would be easier to set up as it involves adding data to 1 table, not every table in the project.
Updated by Jeremie Cornet about 1 year ago
Vincent Picavet wrote:
I see two ways of implementation, don't know which suits best your use case :
- for every layer in the template map, add a "coverage" field, containing the id of the relevant coverage. When generating maps, we filter the layers on this field to only output features with the id of the current drawn coverage.
- for every coverage item, add a "layers" field, with comma-separated list of layers to display for this particular coverage
It's not exactly the same way of handling the feature, both could be complementary as well.
The first option is very useful.
It could be powerful to filter the layer with the subsetstring and the syntax used to display fields on composition.
An example of subsetString : my_field = $FIELD AND my_field2 = $FIELD
I am voluntary to do the code if others found this mechanism interesting.
Updated by Vincent Picavet 8 months ago
- Status changed from New to Rejected
Atlas features have been incorporated into QGIS master as of Oct 2012. This plugin is now obsolete and will not evolve any longer.