30DayMapChallenge

A bit more work

So this map requires a bit more documentation to replicate.

Working in QGIS for developing QGIS python is easier for development.

QGIS python console (open with Ctrl+Alt+P)

You want the file editor, not just the interactive console, open the file editor with the [page and pencil] icon.

Tiling hexagonal SVG

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.

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.

Making the reference tiles

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