So this map requires a bit more documentation to replicate.
Working in QGIS for developing QGIS python is easier for development.
You want the file editor, not just the interactive console, open the file editor with the [page and pencil] icon.
Everything here is an attempt to replicate and adapt what xcaeag did for his great day9 map with forests.
Basically, in QGIS, you take a polygon and calculate the centroids of overlayed hexagons, as well as determine what neighbour configurations each cell has. This is done with the script.
Then, still in QGIS, you will symbolize each point using an SVG tile.
Open the Symbology tab for the hexpoints layer’s attributes.
The menu for this is a bit finicky.
SVG Marker
.> Dynamic SVG parameters
and select on the far right drop-down the ‘edit’ option’'/home/cyrille/public_html/30DayMapChallenge/2023/day10/svg/forest-' || "neighbourhood" || '.svg'
Meters at Scale
and then the Width/Height to an appropriate value (8000 if you use the default script). The ideal values is double the distance between the generated hex points.param()
, such as param(fill)
, param(outline)
, and param(outline-width)
. See reference.It’s possible to take this a bit further, having multiple tile pictures per attribute.
So, for example, the tiles that are completely surrounded could be randomized to use a variety, using something like this:
CASE
WHEN "neighbourhood" == 0 THEN '/home/cyrille/public_html/30DayMapChallenge/2023/day10/svg/forest-0-' || rand(0,5) || '.svg'`
ELSE '/home/cyrille/public_html/30DayMapChallenge/2023/day10/svg/forest-' || "neighbourhood" || '.svg'`
END
Or maybe we make two types of tiles for each, to add some variability:
'/home/cyrille/public_html/30DayMapChallenge/2023/day10/svg/forest-0-' || rand(0,1) || '.svg'`
See other alternatives using this helpful SO response.
Make the 0 tile that’ you’re happy with. Then duplicate 63 more times:
for i in {1..63}; do cp 0.svg "$i.svg"; done