I have a simple CSV file with points only. Each point represents a historical location where certain last name was mentioned in the XIX century. It looks like this:
lat;lon;last_name
55.9885461;66.6202137;Shirokovskoy
44.7522963;33.8534782;Shirokozhukhov
47.434899;35.283909;Shirokolobov
47.601462;35.711934;Shirokonos
48.938369;31.959829;Shirokopoyas
48.938369;31.959829;Shirokopoyas
<...>
So I successfully have added the file as Delimited Text Layer and automatically classified it by attribute 'last_name' which resulted in many colored points on the map. I would like to export each item as a png image. I've tried to use 'Export atlas layout as image' for this purpose but the best result I've got so far is a number of a PNG images which are named by each item but contains the same picture.
Is it possible to automatically export points from each item as a PNG image without showing the others? I will add that I don't even need to change view or styles for each.
-
2Have you tried creating an atlas?Erik– Erik2023年04月04日 12:13:25 +00:00Commented Apr 4, 2023 at 12:13
-
Yes I've tried, but it is still unclear for me how to automatically filter each output image with points from one item only.merchant– merchant2023年04月04日 12:17:45 +00:00Commented Apr 4, 2023 at 12:17
-
Do you want one map per point, or one map per category?Erik– Erik2023年04月04日 12:21:00 +00:00Commented Apr 4, 2023 at 12:21
-
I would like to get one map per category, yes. One last name could have many points.merchant– merchant2023年04月04日 12:23:04 +00:00Commented Apr 4, 2023 at 12:23
2 Answers 2
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 (name_of_the_field_that_holds_the_categories) FROM name_of_the_point_layer
- Create a rule-based symbology for your point layer, setting the rule
"name_of_the_field_that_holds_the_categories" = @atlas_pagename
. This way, only the points whose category match the atlas page name will be shown. - Create a map layout with your desired extent and generate an atlas using the layer created in step 1 as the
coverage layer
. This way, page names will be all point categories and, according to step 2, each page will only show points whose category match the actual atlas page. - Export your atlas pages in
png
(or any other available) format. This way, you'll get one image file representing all the points of each category.
-
Thank you for the advice!merchant– merchant2023年04月26日 14:20:02 +00:00Commented Apr 26, 2023 at 14:20
If I understand well the question, you don't even need to create an atlas. Having your data classified in QGIS, as in this image: enter image description here
Just check/uncheck as desired and then go to the Print Composer, set your map extent and export to PNG.
-
1Thank you for the advice. That is a working solution but the problem is I would have to check/uncheck manually hundreds of thousands times.merchant– merchant2023年04月26日 14:18:13 +00:00Commented Apr 26, 2023 at 14:18
Explore related questions
See similar questions with these tags.