[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-76183":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":17,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":14,"starSnapshotCount":14,"syncStatus":17,"lastSyncTime":27,"discoverSource":28},76183,"grid2poster","open-energy-transition\u002Fgrid2poster","open-energy-transition","Design posters showcasing your country's electrical grid",null,"Python",235,18,1,0,13,97,2,60.04,"MIT License",false,"main",true,[],"2026-06-12 04:01:20","\u003Ch1 align=\"center\">Grid2Poster\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  Generate print-ready posters of electrical grid infrastructure from OpenStreetMap data.\n  Browse the rendered posters in the \u003Ca href=\"https:\u002F\u002Fopen-energy-transition.github.io\u002Fgrid2poster\u002F\">online gallery\u003C\u002Fa>.\n  Transmission lines for a country or continent are downloaded and rendered with GeoPandas, OSMnx, and Matplotlib. The project is heavily inspired and reused styling from \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Foriginalankur\u002Fmaptoposter\">maptoposter\u003C\u002Fa>.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fposters\u002Findia_grid_neon_cyberpunk_20260512_143421.png\" alt=\"India transmission grid - paper_grid theme\" width=\"380\"\u002F>\n  \u003Cimg src=\".\u002Fposters\u002Fafrica_grid_paper_grid_20260512_144322.png\" alt=\"Africa transmission grid - paper_grid theme\" width=\"380\"\u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\"> Grid2Poster supports countries, states, provinces and continents, as well as predefined regions.\u003C\u002Fp>\n\n## Data\n\nGrid2Poster uses OpenStreetMap features tagged as:\n\n- `power=line`\n- `power=minor_line` when enabled\n- `power=cable` when enabled\n\nFeature completeness depends on OpenStreetMap coverage in the selected country or region.\n\n### Contributing to the data\n\nCoverage and quality in your country can be improved by mapping transmission infrastructure directly in OpenStreetMap. [MapYourGrid](https:\u002F\u002Fmapyourgrid.org) is a community initiative that coordinates this work. It provides tutorials, country-level completeness\u002Fquality statistics and mapping tools for tracing power lines, generators and substations from imagery.\n\n## Installation\n\n```bash\npython -m venv .venv\nsource .venv\u002Fbin\u002Factivate\npip install -r requirements.txt\n```\n\n## Usage\n\nBy default every run writes both a PNG and an SVG:\n```bash\npython create_grid_poster.py --country Portugal\n```\n\nFor large countries, reduce the Overpass query tile size:\n```bash\npython create_grid_poster.py --country Vietnam --tile-size-km 150\n```\n\nInclude distribution grids if available. Coverage various significatly across the globe:\n```bash\npython create_grid_poster.py --country Germany --include-minor-lines\n```\n\nList available themes. Create a new theme JSON file in the 'themes' directory to find your own style.\n```bash\npython create_grid_poster.py --list-themes\n```\n\nUse a local GeoJSON file as the boundary instead of geocoding (handy for custom regions or sub-national areas). All polygonal features in the file are dissolved into a single boundary. The `--country` value is still used for the poster title and output filename. `--landscape` will render in landscape (horizontal) orientation.\n```bash\npython create_grid_poster.py --country \"Middle East and North Africa\" --boundary-geojson .\u002Fregions\u002Fmena.geojson --landscape --theme neon_cyberpunk \n```\n\n![](.\u002Fposters\u002Fmiddle_east_and_north_africa_grid_neon_cyberpunk_20260518_001957.png)\n\nRender an entire continent. Continent boundaries come from the Natural Earth admin-0 dataset (downloaded and cached on first use) because Nominatim does not resolve continent names. Accepted values are `Africa`, `Antarctica`, `Asia`, `Europe`, `North America`, `Oceania`, and `South America`. The aggregate name `Global` combines every inhabited continent.\n\n```bash\npython create_grid_poster.py --country Africa --tile-size-km 500\n```\n\nContinent-scale runs hit the Overpass API hundreds of times and can take several hours. A larger `--tile-size-km` cuts the number of queries; pick a value that still stays under the Overpass per-query size limit.\n\n\n## Options\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `--country` | - | Country or region name resolvable by Nominatim, a continent name (`Africa`, `Antarctica`, `Asia`, `Europe`, `North America`, `Oceania`, `South America`), or the aggregate `Global`  |\n| `--boundary-geojson` | - | Path to a local GeoJSON file with polygonal boundary features. Overrides the Nominatim\u002FNatural Earth lookup. Useful for custom regions, sub-national areas, or offline workflows. |\n| `--display-country` | value of `--country` | Text to print on the poster. Useful when the geocoder name differs from the desired title. |\n| `--subtitle` | `ELECTRICAL TRANSMISSION GRID` (or `ELECTRICAL GRID` with `--include-minor-lines`) | Override the subtitle printed under the country\u002Fregion name. |\n| `--padding` | `0.10` | Fractional padding around the boundary bounds. Lower values zoom in (`0` = tight fit, `-0.05` = crop slightly into the bounds); higher values pull the view out. |\n| `--theme` | `paper_grid` | Theme ID from the `themes\u002F` directory. |\n| `--list-themes` | - | List available themes and exit. |\n| `--include-minor-lines` | off | Also fetch `power=minor_line` features. |\n| `--include-cables` \u002F `--no-include-cables` | on | Fetch `power=cable` features (underground\u002Fsubmarine). On by default; pass `--no-include-cables` to skip. |\n| `--include-outlying` | off | Keep overseas territories and other polygons far from the main landmass. By default the geocoded boundary is filtered to the mainland (and nearby islands), so posters for countries like the Netherlands or France do not include Aruba, Curaçao, French Guiana, etc. |\n| `--paper-size` | - | Named preset, portrait orientation. Overrides `--width`\u002F`--height`. Choices: `a5`, `a4`, `a3`, `a2`, `a1`, `a0`, `letter`, `legal`, `tabloid`. Combine with `--landscape` to flip. |\n| `--width` | `297.0` | Poster width in millimeters (default: A3 short side). |\n| `--height` | `420.0` | Poster height in millimeters (default: A3 long side). |\n| `--landscape` | off | Render in landscape (horizontal) orientation. Swaps width and height if width \u003C height. |\n| `--dpi` | `300` | Raster output DPI (applies to PNG output). |\n| `--title-size` | auto | Title font size in points. Auto-scaled from poster size by default; set to override. |\n| `--tile-size-km` | `200` | Overpass query tile size in kilometers. Use smaller values for very large countries or busy servers. |\n| `--format` | `png svg` | Output format(s): any combination of `png`, `svg`, `pdf`. Multiple values are written in one run. |\n| `--output` | auto-generated in `posters\u002F` | Output file path. When set, only a single file is written and its format is inferred from the extension. |\n| `--crs` | `EPSG:3857` | Projection used for rendering. EPSG:3857 (Pseudo-Mercator) works well for country posters. |\n| `--hide-metadata` | off | Do not print segment counts on the poster. |\n| `--export-geojson` | off | Also save all transmission lines as a single GeoJSON in WGS84 (EPSG:4326). Pass a path to override the default location in `posters\u002F`. |\n| `--verbose-osmnx` | off | Print OSMnx request logs. |\n\n## Output\n\nGenerated posters are written to the `posters\u002F` directory by default. Intermediate OSM responses and processed geometries are cached in `cache\u002F` to avoid repeated downloads.\n\n\n## Gallery\n\n| Poster | Country | Theme |\n| --- | --- | --- |\n| ![`china_grid_paper_grid_20260512_173256.png`](posters\u002Fchina_grid_paper_grid_20260512_173256.png) | China | `paper_grid` |\n| ![`south_america_grid_japanese_ink_20260514_141831.png`](posters\u002Fsouth_america_grid_japanese_ink_20260514_141831.png) | South America | `japanese_ink` |\n| ![`india_grid_japanese_ink_20260512_134242.png`](posters\u002Findia_grid_japanese_ink_20260512_134242.png) | India | `japanese_ink` |\n| ![`pakistan_grid_electric_midnight_20260512_152527.png`](posters\u002Fpakistan_grid_electric_midnight_20260512_152527.png) | Pakistan | `electric_midnight` |\n| ![`vietnam_grid_midnight_blue_20260512_153543.png`](posters\u002Fvietnam_grid_midnight_blue_20260512_153543.png) | Vietnam | `midnight_blue` |\n| ![`california_grid_warm_beige_20260512_155549.png`](posters\u002Fcalifornia_grid_warm_beige_20260512_155549.png) | California | `warm_beige` |\n| ![`mexico_grid_forest_20260512_160112.png`](posters\u002Fmexico_grid_forest_20260512_160112.png) | Mexico | `forest` |\n| ![`italy_grid_autumn_20260512_162023.png`](posters\u002Fitaly_grid_autumn_20260512_162023.png) | Italy | `autumn` |\n| ![`zambia_grid_sunset_20260512_162627.png`](posters\u002Fzambia_grid_sunset_20260512_162627.png) | Zambia | `sunset` |\n| ![`marocco_grid_autumn_20260512_165630.png`](posters\u002Fmorocco_grid_autumn_20260518_125319.png) | Morocco | `autumn` |\n| ![`latin_america_grid_emerald_20260516_215030.png`](posters\u002Flatin_america_grid_emerald_20260516_215030.png) | Latin America | `emerald` |\n\n### Predefined regions\n\nThe `regions\u002F` directory ships with multi-country boundaries that map to common power-system groupings. Pass any of them via `--boundary-geojson` and set `--country` to the title you want printed on the poster:\n\n```bash\npython create_grid_poster.py --country \"Continental Europe\" --boundary-geojson .\u002Fregions\u002Fcontinental_europe.geojson --tile-size-km 300\n```\n\n| File | Coverage |\n| --- | --- |\n| `regions\u002Fcontinental_europe.geojson` | Continental Europe Synchronous Area - 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, Turkey, Ukraine. Includes Moldova and Ukraine (synchronized with CE in March 2022) and the Baltic states (Estonia, Latvia, Lithuania, synchronized in February 2025); excludes the Nordic, GB, Ireland, and Cyprus synchronous areas. |\n| `regions\u002Fiberia.geojson` | Spain and Portugal. |\n| `regions\u002Flatin_america.geojson` | Latin America and the Caribbean - 48 entries from Mexico south through Argentina and Chile, plus the Caribbean islands and overseas territories (e.g. Puerto Rico, French Guiana, Guadeloupe). |\n| `regions\u002Fmediterranean.geojson` | 22 countries bordering the Mediterranean: Albania, Algeria, Bosnia and Herzegovina, Croatia, Cyprus, Egypt, France, Greece, Israel, Italy, Lebanon, Libya, Malta, Monaco, Montenegro, Morocco, Palestine, Slovenia, Spain, Syria, Tunisia, Turkey. |\n| `regions\u002Fmena.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. |\n| `regions\u002Fsoutheast_asia.geojson` | Brunei, Cambodia, Indonesia, Laos, Malaysia, Myanmar, Philippines, Singapore, Thailand, Timor-Leste, Vietnam. |\n| `regions\u002Faustralia_mainland_tasmania.geojson` | Australia limited to the mainland and Tasmania - excludes outlying territories (Heard, Macquarie, Norfolk, Lord Howe, Christmas, Cocos) so the framing stays tight. |\n| `regions\u002Fuk_no_shetland.geojson` | United Kingdom with the Shetland Islands trimmed off for tighter framing. |\n| `regions\u002Fus_canada_mainland.geojson` | Continental United States and Canadian mainland south of 60°N - excludes Alaska, the Canadian Arctic, Hawaii and offshore islands. |\n| `regions\u002Fwapp.geojson` | West African Power Pool members - Benin, Burkina Faso, Côte d'Ivoire, Gambia, Ghana, Guinea, Guinea-Bissau, Liberia, Mali, Niger, Nigeria, Senegal, Sierra Leone, Togo. |\n\nFor ad-hoc areas (a single state, a metro region, a custom polygon), supply your own GeoJSON via `--boundary-geojson`. All polygonal features in the file are dissolved into one boundary.\n\n## Attribution\n\nMap data © OpenStreetMap contributors.\n\n","Grid2Poster 是一个用于生成国家或地区电力网络基础设施海报的工具。它通过从OpenStreetMap下载并渲染输电线路数据，使用GeoPandas、OSMnx和Matplotlib等Python库来创建美观且适合打印的海报。用户可以自定义海报的主题风格，并支持包括国家、州\u002F省乃至整个大陆在内的多种地理范围。此项目特别适用于能源行业从业者、教育机构以及对电网布局感兴趣的个人，帮助他们以视觉化的方式展示特定区域内的电力传输网络概况。","2026-06-11 03:54:46","CREATED_QUERY"]