An automated Python pipeline that extracts live geographic vector nodes from the OpenStreetMap API and compiles a complete, print-ready art gallery of Leeds, England.
By mapping the city's complex highway rings, pedestrian grids, and the River Aire across a massive 10,000-meter radius, this project batch-renders 17 distinct, high-resolution aesthetic map designs completely automated via a single script loop.
πΈScreenshots
- Explicit Path Routing: Hardcoded internal virtual environment targeting ensures seamless execution on Windows systems without path distortions.
- Sequential Queue Buffer: Includes an internal 2-second cooldown delay between render iterations to prevent system RAM locks and safely manage file streams.
- Geospatial Caching: Automatically utilizes local XML coordinate caches after the first download pass, accelerating the remaining theme builds to seconds per image.
- Print-Ready Output: Automatically outputs 12" x 16" canvas scales at a crisp 300 DPI (3600 x 4800 px) straight into a dedicated output directory.
The pipeline loops sequentially through the following 17 official style configurations:
| Warm / Earth Tones | Dark Mode / Cyber | Cool / Stark Minimal |
|---|---|---|
πΊ terracotta |
ποΈ noir |
π blueprint |
πͺ΅ warm_beige |
π midnight_blue |
π§ monochrome_blue |
π autumn |
β‘ neon_cyberpunk |
π contrast_zones |
πΈ pastel_dream |
ποΈ japanese_ink |
π³οΈ minimal_stark |
π² forest / emerald |
π ocean / sunset |
ποΈ copper_patina / gradient_roads |
This project utilizes uv by Astral for lighting-fast Python environment and dependency management. If you don't have it installed yet, run this in your terminal:
# Windows PowerShell
powershell -ExecutionPolicy ByPass -c "irm [https://astral.sh/uv/install.ps1](https://astral.sh/uv/install.ps1) | iex"Clone or open your project repository folder:
cd C:\Users\Admin\Desktop\code\py_leeds_posteruv init --python ">=3.12"
uv add maptoposter<=0.5.0To execute the batch process and start your local print shop, spin up the main control script:
uv run generate_leeds.pyNote: On its very first pass, the script will pause on the terracotta theme while it queries OpenStreetMap servers for Leeds' vector infrastructure. Once the graph is cached locally, your computer will quickly generate the remaining 16 layouts.
py_leeds_poster/
βββ .venv/ # Isolated environment containing maptoposter-cli.exe
βββ posters/ # Auto-generated destination folder for your PNGs & JSON metadata
βββ generate_leeds.py # Core automation loop control script
βββ pyproject.toml # Environment lock configuration
βββ README.md # Documentation
-
Interactive CLI Prompts: Integrate an interactive menu prompt (using click or inquirer) to let users configure target city, radius, and themes dynamically without touching the code.
-
Multi-Location Profiles: Add a locations.json batch config file to sequentially generate poster sets for multiple global cities completely unattended in a single run.
-
Automated Mockup Previews: Use the Pillow library to automatically overlay the finished 300 DPI map artwork onto a framed interior stock image for instant product previews.
-
Print Layout Standards: Introduce padding and boundary multipliers for specific international paper sizes (A1, A2, A3) to lock in precise aspect ratios for printing.
-
Parallel Processing Engine: Upgrade the loop to use Python's concurrent.futures multiprocessing, allowing the engine to utilize multiple CPU cores and render multiple themes at the same time.
- Map compilation engine powered by the maptoposter library interface.
- Geographic data provided open-source by OpenStreetMap contributors via Nominatim API.



