2

I have a QGIS project with four layers: A, B, C and D.

I need to prepare an ATLAS automation based on layer A. On maps I want to see data from layers B, C and D (from A not necessarily) but the data needs to match to the attribute from table A selected for automation (the Coverage layer = Layer A, Filter with = values from 'Feature ID' column, Sort by = values from 'Feature ID')

Example: Layer A - ATLAS automation based on values in attribute table from column: 'Feature ID' = 100, 101, 102 and so on.

Data from layers B, C, D visible on maps: features from layer B (C, D) where values in each attribute table from column 'Layer A Reference No' = 100, 101, 102 and so on.

I don't want to see the other features from layers B, C and D (where values are different than the ones selected for ATLAS automation (for example 87, 88 or 94)) for layer A - only the ones which match.

In the end I would see on the first map the data from layers B, C and D where attributes in the column 'Layer A Reference No' = 100 as this is the first map selected by ATLAS (based on Coverage layer A).

On the second map (where ATLAS selects value 101 from layer A) I would see only the data from layers B, C and D where attributes in the column 'Layer A Reference No' = 101.

Is this possible without Python?

At the moment the only thing I can do is to query layers B, C and D in order to see on the map the data where the value in the column 'Layer A Reference No' = 100 (for the first map), 101 (for the second map) etc. and then use layer A for setting location.

But I have to prepare 200 maps!

  • 1
    You could set the layers' styles to be rule based. Your filter expression would be something like "layerAReference" = attribute(@atlas_feature, 'Feature ID') ...... Or "layerAReference" = @atlas_featureid – Jesse McMillan Jan 20 '17 at 17:07
  • Thanks, Jesse. No luck so far. But thank for pointing me into this direction. I think that would be an answer. I will investigate it further and let you know what happens. "layerAReference" = attribute($atlasfeature, 'Feature ID') doesn't bring any data but at least is not rejected as an error. – Maciek Drozda Jan 23 '17 at 10:42
7

I have found the solution.

Atlas generation TAB

Layers B, C and D

They need to be rule based (style) and need to contain the following rules (in Style):

"Feature ID" = attribute( $atlasfeature , 'Feature ID') - for visible records

"Feature ID" <> attribute( $atlasfeature , 'Feature ID') - for all records we don't want to see ( I styled it as transparent)

.....................................................................................................................................................................

Settings for the layer A, which works with ATLAS:

Configuration section:

Coverage layer: A

Hidden coverage layer: - TICKED

Filter with - NOT TICKED - this is important as the automation won't work otherwise

Output section:

Output filename expression: attribute($currentfeature, 'Feature ID') - this is not mandatory but will produce single files with the name = to the values from Feature ID column

Single file export when possible - NOT TICKED - this can be ticked in order to create a booklet, but not in my case

Sort by: Feature ID

.....................................................................................................................................................................

Item properties TAB

Below are my settings for the Map in the Item properties panel

enter image description here

.....................................................................................................................................................................

Thanks Jesse again. I hope this will help the others as well at some point.

Regards, Maciek Drozda

  • Thanks for the detailed answer, don't forget to mark your question as answered with the greyed-out tick. – George of all trades Jan 23 '17 at 12:16

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.