0

I have a Postgres data source that needs to be filtered from hundreds of records to a few records, each time a make a map. Is there a way to automate that, so that the atlas makes map pages for each 'unique' value in the filter field.

To be specific, I have list of states/provinces in the dataset where a particular language is spoken in the country. For each new language map, currently I am filtering the data source list using the filter function on the 'language' field.

Can Python commands or the Atlas feature be used to say generate such filtered language maps in bulk ?

enter image description here

Ian Turton
  • 81,417
  • 6
  • 84
  • 185
  • MPS Atlas is long distant history, data driven pages is the Esri product that replaced it. Are you using MPS Atlas or Esri DDP? It sounds like what you're after is a dynamic definition query https://resources.arcgis.com/en/help/main/10.2/index.html#//00s90000003p000000 for Esri DDP, Atlas had a similar function but I'd be stretched finding any reference to that. – Michael Stimson Sep 30 '20 at 07:10
  • I am using QGIS and trying out the Atlas feature. So far I am able to generate Atlas for each province/state since that is a SHP file feature. But I am trying to see if I can so same for unique values in the data source filter fields - This case it's the language name. – B Alexander Sep 30 '20 at 07:13
  • 1
    Oh, that's my mistake, using data driven map I assumed you were using Esri products. This post might help https://gis.stackexchange.com/questions/173399/filtering-features-in-other-layers-of-qgis-atlas – Michael Stimson Sep 30 '20 at 07:18
  • If you use a rule in the layer styling for a layer you want to display for a page you might try "your page name" = @atlas_pagename . If you don't want something to display you could add a rule for else. – John Sep 30 '20 at 13:02
  • Check out this question / answer for a similar issue. Full disclosure, I wrote an answer to it. But it details how to create an atlas based on unique values in a layer as opposed to unique features. – jcarlson Sep 30 '20 at 13:14
  • Thanks @JoshC your example seems similar to the challenge I am facing, Is the 'Lines' Layer the one that is the SHP layer ? I understand that 'Types' is the one with the unique values in a a standalone table – B Alexander Sep 30 '20 at 18:28
  • The "Lines" layer in that example would be the layer with many records which needs to be filtered to a few in each atlas page. – jcarlson Sep 30 '20 at 20:08
  • Thanks, I tried and have added comments on that example, page. Having some trouble with adding the rule based symbology. – B Alexander Oct 01 '20 at 02:19

0 Answers0