Repolode
originalankur

originalankur/maptoposter

Python command-line tool that generates minimalist, printable map posters of any city from OpenStreetMap data, with selectable color themes.

Stars
14,223
Forks
1,256
Open issues
61
Last commit
3 months ago

What is it?

City Map Poster Generator takes a city and country name, geocodes the location, and downloads street, water and park data from OpenStreetMap via OSMnx. It renders the result with matplotlib as a PNG poster, with the city and country name, coordinates and a chosen color theme.

The tool ships with 17 built-in themes defined as JSON files, and custom themes can be added by writing a new JSON file with colors for background, water, parks and road types. Map radius, output dimensions in inches, and center coordinates can all be set from the command line. Non-Latin city and country names can be displayed using Google Fonts, which are downloaded and cached locally.

The project is aimed at people who want a decorative city print or wallpaper generated from code, and it includes a short contributor guide describing the rendering pipeline for those who want to extend it.

Key features

  • 01Generates posters for any city by name, or from explicit latitude and longitude.
  • 02Ships with 17 color themes and supports custom themes via JSON files.
  • 03Adjustable map radius, poster width and height in inches, and output resolution.
  • 04Displays localized city and country names with Google Fonts, including Japanese, Korean, Arabic and Thai.
  • 05Can render all themes for one city in a single run.

Use cases

  • Making a decorative print of a hometown or travel destination.
  • Creating phone or desktop wallpapers and Instagram graphics from city maps.
  • Producing A4 or large-format map art for a wall or gift.
  • Experimenting with matplotlib and OSMnx rendering by modifying the theme or layer code.

Quick start

  1. 1

    Install uv (recommended), then run the script; dependencies install automatically

    uv run ./create_map_poster.py --city "Paris" --country "France"
  2. 2

    Or install with pip and a virtual environment

    pip install -r requirements.txt
  3. 3

    Generate a poster with pip and venv

    python create_map_poster.py --city "Paris" --country "France"

Things to know

  • Needs an internet connection for geocoding, OpenStreetMap data and Google Fonts downloads.
  • Large distances or big print sizes can make generation slow and heavy.

Topics

FAQ

What is maptoposter?
Python command-line tool that generates minimalist, printable map posters of any city from OpenStreetMap data, with selectable color themes. City Map Poster Generator takes a city and country name, geocodes the location, and downloads street, water and park data from OpenStreetMap via OSMnx. It renders the result with matplotlib as a PNG poster, with the city and country name, coordinates and a chosen color theme.
Is maptoposter free to use? What license does it have?
maptoposter is open source under the MIT license. Check the license terms before using it in commercial products.
Is maptoposter still maintained?
Updated within 6 months. The last commit to maptoposter was on Aug 6, 2026.
What can I use maptoposter for?
Making a decorative print of a hometown or travel destination. Creating phone or desktop wallpapers and Instagram graphics from city maps. Producing A4 or large-format map art for a wall or gift. Experimenting with matplotlib and OSMnx rendering by modifying the theme or layer code.
How do I install maptoposter?
Install uv (recommended), then run the script; dependencies install automatically: uv run ./create_map_poster.py --city "Paris" --country "France" Or install with pip and a virtual environment: pip install -r requirements.txt Generate a poster with pip and venv: python create_map_poster.py --city "Paris" --country "France"
Where can I get maptoposter?
The source code and installation instructions are on GitHub: https://github.com/originalankur/maptoposter

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects