Create print-ready posters of electrical grid infrastructure from OpenStreetMap data.
Transmission lines for a country or continent are downloaded and presented with GeoPandas, OSMNX, and Matplotlib. This project is heavily inspired and reused styling from Maptoposter.

Grid2Poster supports countries, states, provinces and continents as well as predefined regions.
Grid2Poster uses OpenStreetMap features tagged as follows:
power=linepower=minor_linewhen ablepower=cablewhen able
Feature completeness depends on OpenStreetMap coverage in the selected country or region.
Coverage and quality in your country can be improved by mapping transmission infrastructure directly in OpenStreetMap. MapYourGrid is a community initiative that coordinates this work. It provides tutorials, country-level completeness/quality statistics, and mapping tools to locate power lines, generators, and substations from imagery.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
By default each run writes both a PNG and an SVG:
python create_grid_poster.py --country Portugal
For larger countries, reduce the size of the overpass query tile:
python create_grid_poster.py --country Vietnam --tile-size-km 150
Include distribution grid if available. Coverage varies significantly around the world:
python create_grid_poster.py --country Germany --include-minor-lines
List the available topics. Create a new theme JSON file in the ‘themes’ directory to find your own style.
python create_grid_poster.py --list-themes
Use a local GeoJSON file as limits instead of geocoding (useful for custom regions or sub-national regions). All polygon features in the file are merged into a single extent. --country The value is still used for the poster title and output file name. --landscape Will be presented in landscape (horizontal) orientation.
python create_grid_poster.py --country "Middle East and North Africa" --boundary-geojson ./regions/mena.geojson --landscape --theme neon_cyberpunk

Present an entire continent. Continent boundaries come from the Natural Earth Admin-0 dataset (downloaded and cached on first use) as Nominatim does not resolve continent names. accepted values are Africa, Antarctica, Asia, Europe, North America, OceaniaAnd South America. composite name Global Connects every inhabited continent.
python create_grid_poster.py --country Africa --tile-size-km 500
Continent-scale runs impact the Overpass API hundreds of times and can take several hours. a larger --tile-size-km Cuts down on the number of questions; Choose a value that still remains under the Overpass per-query size limit.
| Option | default | Description |
|---|---|---|
--country |
– | The name of a country or region, the name of a continent, resolvable by nominatim (Africa, Antarctica, Asia, Europe, North America, Oceania, South America), or set Global |
--boundary-geojson |
– | Path to local GeoJSON file with polygon boundary features. Overrides the nominal/natural meaning lookup. Useful for custom regions, sub-national regions or offline workflows. |
--display-country |
value of --country |
Text to be printed on the poster. Useful when the geocoder name is different from the desired title. |
--subtitle |
ELECTRICAL TRANSMISSION GRID (Or ELECTRICAL GRID with --include-minor-lines) |
Overrides the subtitles printed under the country/region name. |
--padding |
0.10 |
Partial padding around the border border. The following values zoom in (0 = tight fit, -0.05 = cut a little into the range); Higher values stretch the view out. |
--theme |
paper_grid |
theme id from themes/ Directory. |
--list-themes |
– | List available themes and exit. |
--include-minor-lines |
Close | also bring power=minor_line features. |
--include-cables / --no-include-cables |
But | Bring in power=cable Features (underground/submarine). On by default; pass --no-include-cables To jump. |
--include-outlying |
Close | Keep foreign areas and other polygons away from the mainland. By default the geocoded extent is filtered to the mainland (and nearby islands), so posters from countries like the Netherlands or France do not include Aruba, Curaçao, French Guiana, etc. |
--paper-size |
– | Named preset, portrait orientation. override --width/--height. Option: a5, a4, a3, a2, a1, a0, letter, legal, tabloid. combined with --landscape to flip. |
--width |
297.0 |
Poster width in millimeters (default: A3 on the smaller side). |
--height |
420.0 |
Poster height in millimeters (default: A3 long side). |
--landscape |
Close | Present in landscape (horizontal) orientation. If width < height then swap width and height. |
--dpi |
300 |
Raster output DPI (applies to PNG output). |
--title-size |
auto | Title font size in points. Auto scaled to poster size by default; Set to override. |
--tile-size-km |
200 |
Overpass query tile size in kilometers. Use smaller values for very large countries or busy servers. |
--format |
png svg |
Output Format(s): Any Combination png, svg, pdf. Multiple values are written at once. |
--output |
automatically generated in posters/ |
Output file path. When set, only one file is written and its format is inferred from the extension. |
--crs |
EPSG:3857 |
Projection is used for rendering. EPSG:3857 (pseudo-Mercator) works well for country posters. |
--hide-metadata |
Close | Do not print section numbers on the poster. |
--export-geojson |
Close | Also save all transmission lines as a single GeoJSON in WGS84 (EPSG:4326). Pass a path to override the default location posters/. |
--verbose-osmnx |
Close | Print the OSMnx request log. |
The generated posters are written posters/ Directory by default. Intermediate OSM responses and processed geometries are cached cache/ To avoid repeated downloads.
regions/ The directory comes with multi-country boundaries that map common power-system groups. cross any of them --boundary-geojson and set --country For the title you want to print on the poster:
python create_grid_poster.py --country "Continental Europe" --boundary-geojson ./regions/continental_europe.geojson --tile-size-km 300
| file | coverage |
|---|---|
regions/continental_europe.geojson |
Continental Europe sync zone – 31 countries: Albania, Austria, Belgium, Bosnia and Herzegovina, Bulgaria, Croatia, Czech Republic, Estonia, France, Germany, Greece, Hungary, Italy, Kosovo, Latvia, Lithuania, Luxembourg, Moldova, Montenegro, Netherlands, North Macedonia, Poland, Portugal, Romania, Serbia, Slovakia, Slovenia, Spain, Switzerland, Türkiye, Ukraine. These include Moldova and Ukraine (synchronized with CE in March 2022) and the Baltic states (Estonia, Latvia, Lithuania, synchronized in February 2025); Excludes Nordic, GB, Ireland and Cyprus sync zones. |
regions/iberia.geojson |
Spain and Portugal. |
regions/latin_america.geojson |
Latin America and the Caribbean – 48 entries from Mexico south through Argentina and Chile, as well as Caribbean islands and overseas territories (e.g. Puerto Rico, French Guiana, Guadeloupe). |
regions/mediterranean.geojson |
22 countries bordering the Mediterranean Sea: Albania, Algeria, Bosnia and Herzegovina, Croatia, Cyprus, Egypt, France, Greece, Israel, Italy, Lebanon, Libya, Malta, Monaco, Montenegro, Morocco, Palestine, Slovenia, Spain, Syria, Tunisia, Turkey. |
regions/mena.geojson |
Middle East and North Africa – 18 countries: Algeria, Bahrain, Egypt, Iraq, Israel, Jordan, Kuwait, Lebanon, Libya, Morocco, Oman, Palestine, Qatar, Saudi Arabia, Syria, Tunisia, United Arab Emirates, Yemen. |
regions/southeast_asia.geojson |
Brunei, Cambodia, Indonesia, Laos, Malaysia, Myanmar, Philippines, Singapore, Thailand, Timor-Leste, Vietnam. |
regions/uk_no_shetland.geojson |
The United Kingdom, along with the Shetland Islands, were drawn to strict framing. |
regions/us_canada_mainland.geojson |
The continental United States and the Canadian mainland south of 60° north – excludes Alaska, the Canadian Arctic, Hawaii and offshore islands. |
regions/wapp.geojson |
Members of the West African Power Pool – Benin, Burkina Faso, Côte d’Ivoire, Gambia, Ghana, Guinea, Guinea-Bissau, Liberia, Mali, Niger, Nigeria, Senegal, Sierra Leone, Togo. |
For ad-hoc areas (a state, a metro area, a custom polygon), supply your own GeoJSON --boundary-geojson. All polygonal features in the file are merged into one boundary.
Map data © OpenStreetMap contributors.
<a href