Skip to content

Enhancement: Map rotation and North orientation badge. Fixes #178#181

Open
juandesant wants to merge 12 commits intooriginalankur:mainfrom
juandesant:main
Open

Enhancement: Map rotation and North orientation badge. Fixes #178#181
juandesant wants to merge 12 commits intooriginalankur:mainfrom
juandesant:main

Conversation

@juandesant
Copy link

This change request provides three additional arguments to create_map_poster.py:

  • Adds --offset-orientation/-O arguments to provide a rotation from north (positive is towards the east) in decimal degrees.
  • Adds --show-north/--hide-north options which are complementary. When orientation is not changed (the default is zero), the default for this option is --hide-north, but still you can use --show-north to force the appearance of the orientation badge. Conversely, if there is a non-zero argument to --offset-orientation/-O, the default is for --show-north, but can be hidden with --hide-north.
  • Adds a compass.svg file, based on a wikimedia commons file. The comments acknowledge the origin as per its CC-BY-SA license.

Please note that, in order not to introduce new dependencies, the SVG file is imported as a matplotlib Poligon, and uses the existing textures. More details on ROTATION.md.

@PasikVN PasikVN mentioned this pull request Feb 10, 2026
@zkornbluth
Copy link
Contributor

Played around with this for a bit, and it appears to be losing the parks and water layers for rotated maps.

Example:
python create_map_poster.py -c "Montréal" -C "Canada" -t ocean -lat 45.5009388 -long -73.681061 -d 35000

python create_map_poster.py -c "Montréal" -C "Canada" -t ocean -lat 45.5009388 -long -73.681061 -d 35000 -O -45

@originalankur
Copy link
Owner

@zkornbluth your open pr is also merged in resulting in the poster losing the parks and water layers for rotated maps or it's just @juandesant PR?.

@zkornbluth
Copy link
Contributor

@zkornbluth your open pr is also merged in resulting in the poster losing the parks and water layers for rotated maps or it's just @juandesant PR?.

Just this PR. Mine doesn't have the rotation.

PasikVN added a commit to PasikVN/maptoposter that referenced this pull request Feb 11, 2026
- **theme**  Grand Prix
- **Rotation** Added rotation ([PR originalankur#181](originalankur#181))
@PasikVN
Copy link

PasikVN commented Feb 17, 2026

@zkornbluth your open pr is also merged in resulting in the poster losing the parks and water layers for rotated maps or it's just @juandesant PR?.

Just this PR. Mine doesn't have the rotation.

Same here. Rotation loses water and parks (and other feature that i adedd like railways and airstrips)

@PasikVN
Copy link

PasikVN commented Feb 19, 2026

@zkornbluth @originalankur I managed to fix that problem (but need to test more on other cites and different land features) but here is the result.
changi_airport_terracotta_20260219_165533
changi_airport_terracotta_20260219_165556

PasikVN added a commit to PasikVN/maptoposter that referenced this pull request Feb 20, 2026
Removing option to add oceans (always display)
Fixing some rotation issues (originalankur#181)
Converting as much as possible OSMNX to GDF before ploting for performance
optimizing --show-north argument by using argparse.BooleanOptionalAction
@originalankur
Copy link
Owner

Thanks @PasikVN will be extensively testing today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants