7

I have a layer that contains counties within the state of Washington.

I need to build one map (jpg) for each county. For that specific map all counties will show as light grey, but the specific county will be green, and the file name will be the county name.

2 Answers 2

15

What you want is creating the Atlas.

  1. In print composer, go to Atas generation tab and check Generate atlas.
  2. As covarage layer set your counties layer, and as output set your name of counties attribute (somtheing like "counties_names").
  3. Go to layer properties and set rule-based symbology, create empty rule with grey color and in this rule nest a rule like $id = @atlas_featureid with green color (see picture below).

enter image description here

  1. Go back to print composer and start preview of atlas (in atlas panel or menu Atlas --> Preview Atlas. Now you can browse atlas features by Next feature and Previous feture and so on.
  2. If you wnat add other items like text fields, scalebar etc. (You can also control text fields by expression, so you can get for each atlas feature uniqe text fields values, for example counties names.)
  3. Export via atlas panel or menu Atlas --> Export Atlas as Images...

Possible output (one of exported images):

enter image description here

3
  • Good answer, you just forgot to explain how to use the county name in the outptu file. Dec 17, 2016 at 15:13
  • 2
    Wow, so much easier that I expect, and yet another part of QGIS I never new about. The graphics were a great help, btw.
    – Ben
    Dec 17, 2016 at 15:25
  • 1
    @AlexandreNeto it is in step 2 ;)
    – Oto Kaláb
    Dec 17, 2016 at 15:25
0

Further too Oto Kaláb.

To invert the selection you need to use the != on the grey color. see my example below.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.