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.
Answer
What you want is creating the Atlas.
- In print composer, go to Atas generation tab and check Generate atlas.
- As covarage layer set your counties layer, and as output set your name of counties attribute (somtheing like
"counties_names"
). - 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).
- 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.
- 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.)
- Export via atlas panel or menu Atlas --> Export Atlas as Images...
Possible output (one of exported images):
No comments:
Post a Comment