Skip to content

Instantly share code, notes, and snippets.

@eyeNsky
eyeNsky / mapnik-rotate
Last active November 27, 2018 21:55
rotate mapnik output map
View mapnik-rotate
Mapnik supports the PROJ.4 WKT for projections and buried deep in the doc's is one called
'Two Point Equidistant'. You provide the left and right points and the map is rotated
such that these two points are horizontal in the output.
This allows you to rotate the map to any angle (including south up!!) and the text is
rendered correctly! You don't have to change the projections of your input vectors.
Simply tweak the mapnik generate_image.py script like this:
Change: