QGIS atlas - multiple layer, same extent

المشرف العام

Administrator
طاقم الإدارة
This is going back to a previous question from a few years ago that I asked and didn't find a solution for. QGIS has advanced a few versions since then - so I'm hoping there is either an updated solution, or someone could provide guidance to develop a script.

Advanced warning - I'm a geologist - layers of rock are how I think! :)

I have a project area for which I want to produce a series of maps (an atlas). Each map will cover exactly the same extent, but will show properties for a different layer of rock. In this example - contours of the depth to the top of 50 different rock layers.

The desired output would be 50 maps, same extent, different layer (or layer set) displayed

To add more complexity - I'd like to add 'sets' of layers. Rock layer 1 also has unique shapefiles showing the extent polygon layer and also a label_point layer.

Current Method

I've tried merging all the contour layers into one shapefile and using this as the Atlas coverage layer. This method doesn't quite produce the desired result because:

  • I can't filter the combined layer to only show one layer (not one feature) at a time.
  • I can filter using this rule based style expression on the combined layer! (where unit is the rock layer name):
attribute($currentfeature , 'unit') = attribute(@atlas_feature, 'unit')

  • Critical issue - I get one page per individual contour (ie. one per feature - so hundreds of pages per rock layer). I can't work out how to filter so I only get one page per rock layer (or if that is possible).
  • I can't merge the different 'sets' (points, polylines, polygons). Workaround - I could merge and filter based on geometry type - same as above.
  • Merging 50 input files into one master shapefile seems a bit redundant - surely one more code loop could negate the need for this? Workaround - use the processing framework to combine input files.

أكثر...
 
أعلى