Skip to main content
17 votes
Accepted

Filtering layers in QGIS atlas

You can use the tbl_metadata file as coverage layer in Atlas. Then use rule-based symbology with @layer_name = @atlas_pagename. I assume that your data looks like this (the attribute table is ...
Oto Kaláb's user avatar
  • 6,935
15 votes
Accepted

Displaying only attributes not zero in QGIS Atlas text box

Manual version With this option, you manually add a row for each attribute, reusing the same expression. See below how to automatize this for all fieldnames at once. Create a condition for each ...
Babel's user avatar
  • 73.8k
14 votes

QGIS Atlas turning on/off raster layers

I've just done this with 84 different raster layers. The method i used was: Create an atlas polygons layer with 84 features in it. Create a text field in the atlas polygons layer and write the names ...
Swale's user avatar
  • 161
14 votes

Show only features within current Atlas feature

If as @Underdark suggests you set a rule based style using a filter like: intersects( $geometry , @atlas_geometry ) You will get the effect that you want, though some of my buildings cross the ...
Ian Turton's user avatar
  • 82.6k
13 votes
Accepted

Styling currently used feature of Coverage layer of Atlas

You don't need to consider the page name or number. Since the layer you are trying to dynamically style is the same as the coverage layer, you can use the following expression: $id = @atlas_featureid ...
Alexandre Neto's user avatar
11 votes

Determining neighbouring tile ids in QGIS

You already did most of the work required to determine the tiles that you want to print using an atlas. But the point is how to adjust everything together to show only the tile IDs that you need. To ...
ahmadhanb's user avatar
  • 41.2k
11 votes
Accepted

Seeking QGIS geometry generator manual?

There is no such site so far. The feature is rather new and usage examples are only starting to emerge now. For your specific use case, I'd still recommend to create a line layer with all ...
underdark's user avatar
  • 84.3k
11 votes

Export a configured Atlas with a Python script / command line?

In QGIS 3.4 (maybe 3.x in general), exporting atlas seems much more straight forward than before (at least from looking the available answers). from qgis.core import QgsApplication, QgsProject, ...
Alexandre Neto's user avatar
11 votes

Adding site photos to a print composer atlas in QGIS

It looks like so hard without any script. So I tried a solution like below. Sample data: margin and interval Script: Copy/paste the script to QGIS Python Editor. Set layout_name, layer_name, ...
Kadir Şahbaz's user avatar
11 votes
Accepted

Move inset map in QGIS based on defined anchor point

I had this problem before. The only way I found to do it was to write a IF expression for the inlay map's X position (item properties > position and size > X). Make a note of the inlay map's X ...
TeddyTedTed's user avatar
  • 6,190
10 votes

Automatically Show the Page Number of Atlas QGIS

Add a label Set this text: [% @atlas_featurenumber %]
HeikkiVesanto's user avatar
10 votes
Accepted

Adding page number to an atlas layout with PyQGIS 3

You can use the following structure: # # previous lines # page_label = QgsLayoutItemLabel(layout) # # other label settings here # text = "[% 'Page: ' + to_string(@atlas_featurenumber ) + '/' +...
Kadir Şahbaz's user avatar
9 votes

Seeking QGIS geometry generator manual?

This is possible using a different 'geometry generator' to the one that you originally intended I suspect, You can avoid having to generate the all connections line layer by using a virtual layer: ...
Andy Harfoot's user avatar
  • 3,407
9 votes

Adding date to label in QGIS Atlas composer?

Just tried it out, for me (QGis 2.18) format_date(now(),'dd.MM.yyyy') works. /edit: You need to put the [% %] around your whole expression, then it should work, like: [%'Datum: ' || format_date(now(),...
Erik's user avatar
  • 16.8k
9 votes
Accepted

Varying page size of maps within an Atlas in QGIS?

In the Page properties of the layout (Right click the map) you can set the Orientation using an expression. if( bounds_height( @atlas_geometry )> bounds_width(@atlas_geometry ) , 'portrait', '...
Ian Turton's user avatar
  • 82.6k
9 votes

How to turn off QGIS legend band number by default?

Just stumbled on this problem myself... Found a (slightly hacky) solution. Double click on the text that says "Band 1" in the Legend Items box of the layout. replace this text with a space i....
Hugh Graham's user avatar
9 votes

Using two different maps on one atlas page

Yes you can do this with the expression string builder overriding the extent of the second map regarding the extent of the first map which is controlled by the atlas. Supposing your two maps have the ...
eurojam's user avatar
  • 11.7k
9 votes
Accepted

Automatically export each item in a layer as an image

According to the ideas posted here I suggest you to follow these steps: Create a non-geometry layer with the names of your categories. For example, a virtual layer with SELECT DISTINCT (...
jpinilla's user avatar
  • 3,240
9 votes
Accepted

Generate cover layer for atlas

Algorithmic approach Define a fixed width x and hight y for the rectangles (grid cells). Split your polygon in horizontal slices (bands, belts) at the interval of y (red outlined in screenshot). Get ...
Babel's user avatar
  • 73.8k
9 votes
Accepted

"Show single Polygon" Atlas Filter Expression

you can use a ruled based layer-styling with the following rule: $id = @atlas_featureid which will show in the atlas only the current atlas feature, all others will be invisible. Be aware that in ...
eurojam's user avatar
  • 11.7k
8 votes

Map Atlas switching orientation in QGIS

I used a if expression instead of building a virtual column if(bounds_height( @atlas_geometry ) > bounds_width( @atlas_geometry ) ,'portrait','landscape') this can be used to configure x ...
Júlio Cesar's user avatar
8 votes
Accepted

Automating Atlas to create maps for all Attributes

Step 1: Categorize your original shapefile Stylize your original shapefile with graduated categories based on the first of your 50 attributes. Rename the layer (NOT the original shapefile) to ...
csk's user avatar
  • 25k
8 votes
Accepted

Custom label color in QGIS atlas

Since the font color of labels in print composer in QGIS 2.18 can not be data-defined, a workaround is needed. One possible approach is to duplicate the the "N" and "S" labels with black versions on ...
underdark's user avatar
  • 84.3k
8 votes

Filtering out labels surrounding active feature in Atlas

To hide the labels outside the atlas geometry boundary, you need to do the following: Right-click the layers that their labels are shown outside the atlas geometry boundary Go to Layer properties for ...
ahmadhanb's user avatar
  • 41.2k
8 votes
Accepted

Setting options in "PDF Export Options" to export an atlas to PDF using PyQGIS

Setting those options using PyQGIS requires using QgsLayoutExporter.PdfExportSettings() instance. pdf_settings = QgsLayoutExporter.PdfExportSettings() Then; For "Always export as vector" ...
Kadir Şahbaz's user avatar
8 votes
Accepted

Access report/atlas page from feature in layer (QGIS)

The identify tool could do what you expect in possibility number 1. It could open the atlas page you click on. Step by step : Select the layer used as coverage layer Click on the identify tool Right-...
Corentin Lemaitre's user avatar
8 votes
Accepted

QGIS filter Atlas with intersecting geometries

For my understanding, you want to apply a filter to your atlas layer based on other layer geometry. In the layout control panel, you can set a filter applied on your atlas layer to get atlas produced ...
Corentin Lemaitre's user avatar
8 votes
Accepted

Atlas - Export only certain pages

Option 1 Click Atlas --> Atlas Settings Here, you have chosen which layer composes the atlas. You can add a filter setting by expression. Put something like 'name' LIKE "feature3" OR '...
Cupain's user avatar
  • 695
7 votes
Accepted

How to count points within the current Print composer atlas feature in QGIS 2.8?

This works for me: use the aggregate() expression in a text label, with within($geometry,@atlas_geometry) as a filter for points within your atlas feature. The full syntax in your text label would be ...
she_weeds's user avatar
  • 12.7k
7 votes

Setting data-driven symbol levels in QGIS

The answer is Yes No. EDIT As @Babel pointed it out to me, Symbol levels are a vector layer symbology option to choose the order of symbol layers, see here the official documentation. So the answer ...
J. Monticolo's user avatar
  • 15.9k

Only top scored, non community-wiki answers of a minimum length are eligible