Recreate the XKCD ABS(LONGITUDE) map in QGIS

Map Academy
Map Academy
548 بار بازدید - 12 ماه پیش - Sometimes you see a cool/weird
Sometimes you see a cool/weird map online and you think: 'hey, can I recreate something like this in QGIS'? Well, a recent map from the xkcd webcomic is one such example - thanks Doug for the suggestion!

Here's the map, by Randall Munroe https://m.xkcd.com/2807/

xkcd font: https://github.com/ipython/xkcd-font

Thanks to Doug for asking me about this - quite a nice challenge.

The geometry generator expression for the flipped world layer, with no negative longitude areas
densify_by_count(intersection(rotate(flip_coordinates( $geometry),270,make_point(0,0)), make_polygon(geom_from_wkt(
'LINESTRING(0 90, 180 90,
180 -90, 0 -90, 0 90)'))),100)

The geometry generator expression for the world layer clipped to only show positive longitude areas
densify_by_count(
intersection($geometry, make_polygon(geom_from_wkt('LINESTRING(0 90, 180 90,
180 -90, 0 -90, 0 90)'))),100)

To densify the layer extent box I created
densify_by_count($geometry,100)

Note: if you change the values after LINESTRING in the two longer geometry generator expressions above then you can do this for the western hemisphere instead of the eastern hemisphere. To do that, all you'd need to do is follow the steps in the video but use -180 instead of 180 in both expressions. The possibilities are almost endless!

Simplemaps world cities layer: https://simplemaps.com/data/world-cities (Creative Commons Attribution 4.0)

See my intro and intermediate QGIS courses for more: https://www.udemy.com/user/alasdair-r...
12 ماه پیش در تاریخ 1402/05/15 منتشر شده است.
548 بـار بازدید شده
... بیشتر