惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
The Cloudflare Blog
量子位
T
Tailwind CSS Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog
MyScale Blog
MyScale Blog
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
G
Google Developers Blog
D
DataBreaches.Net
V
Visual Studio Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
U
Unit 42
博客园 - 聂微东
有赞技术团队
有赞技术团队
A
About on SuperTechFans

Hacker News

GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Bonsai 1-bit WebGPU - a Hugging Face Space by webml-community Moving a large-scale metrics pipeline from StatsD to OpenTelemetry / Prometheus GitHub - Nightmare-Eclipse/RedSun: The Red Sun vulnerability repository GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - macOS26/Agent: Any AI, replaces Claude Code, Cursor, OpenClaw. Over 18 LLM providers (Claude, OpenAI, Gemini, Ollama, Zai, HF, Qwen) wired into a native Mac app that writes code, builds Xcode projects, bumps versions, manages git, automates Safari, use AppleScript, JS or Accessibility, extend Agent! w/ MCP Servers, run tasks from your iPhone via Messages. YouTube now lets you turn off Shorts I Made a Terminal Pager Burgers | マクドナルド公式 Commands — HackerNews CLI documentation ChatGPT for Excel PiCore - Raspberry Pi Port of Tiny Core Linux Live Nation illegally monopolized ticketing market, jury finds Google Broke Its Promise to Me. Now ICE Has My Data. Founding Engineer at Adaptional | Y Combinator CRISPR takes important step toward silencing Down syndrome’s extra chromosome GitHub - saffron-health/libretto: The AI toolkit for building reliable browser automations US v. Heppner (S.D.N.Y. 2026) no attorney-client privilege for AI chats [pdf] Retrofitting JIT Compilers into C Interpreters IPv6 – Google The Accursèd Alphabetical Clock Cybersecurity Looks Like Proof of Work Now Fragments: April 14 Cal.com Goes Closed Source: Why AI Security Is Forcing Our Decision | Cal.com - Scheduling Software for Online Bookings Laravel raised money and now injects ads directly into your agent When moving fast, talking is the first thing to break Too much Discussion of the XOR swap trick – Heather Cafe Introduction to Spherical Harmonics for Graphics Programmers The Grand Line
GitHub - open-energy-transition/grid2poster: Design stunn...
lyoncy · 2026-05-13 · via Hacker News

Generate print-ready posters of electrical grid infrastructure from OpenStreetMap data.
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 maptoposter.

India transmission grid — paper_grid theme Africa transmission grid — paper_grid theme

Grid2Poster supports countries, states, provinces and continents, as well as optional administrative boundaries.

Data

Grid2Poster uses OpenStreetMap features tagged as:

  • power=line
  • power=minor_line when enabled
  • power=cable when enabled

Feature completeness depends on OpenStreetMap coverage in the selected country or region.

Contributing to the data

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 for tracing power lines, generators and substations from imagery.

Installation

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Usage

python create_grid_poster.py --country Germany

For large countries, reduce the Overpass query tile size:

python create_grid_poster.py --country France --tile-size-km 150

Export as SVG or PDF for vector workflows:

python create_grid_poster.py --country Spain --format svg
python create_grid_poster.py --country Poland --format pdf

Include additional infrastructure layers:

python create_grid_poster.py --country Germany --include-minor-lines --include-cables

List available themes:

python create_grid_poster.py --list-themes

Render 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:

python create_grid_poster.py --country Africa --tile-size-km 500

Continent-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.

Export the rendered transmission lines as GeoJSON (WGS84) alongside the poster, for reuse in GIS tools:

python create_grid_poster.py --country Germany --export-geojson
python create_grid_poster.py --country Germany --export-geojson data/germany_grid.geojson

Without a path, the file is written to posters/ next to the poster. The export is a single FeatureCollection of all fetched lines reprojected to EPSG:4326.

Options

Option Default Description
--country Country or region name resolvable by Nominatim, or a continent name (Africa, Antarctica, Asia, Europe, North America, Oceania, South America).
--display-country value of --country Text to print on the poster. Useful when the geocoder name differs from the desired title.
--theme electric_midnight Theme ID from the themes/ directory.
--list-themes List available themes and exit.
--include-minor-lines off Also fetch power=minor_line features.
--include-cables off Also fetch power=cable features.
--width 12.0 Poster width in inches.
--height 16.0 Poster height in inches.
--dpi 300 Raster output DPI (applies to PNG output).
--tile-size-km 200 Overpass query tile size in kilometers. Use smaller values for very large countries or busy servers.
--format png Output format: png, svg, or pdf.
--output auto-generated in posters/ Output file path.
--crs EPSG:3857 Projection used for rendering. EPSG:3857 (Pseudo-Mercator) works well for country posters.
--hide-metadata off Do not print segment counts on the poster.
--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/.
--verbose-osmnx off Print OSMnx request logs.

Output

Generated posters are written to the posters/ directory by default. Intermediate OSM responses and processed geometries are cached in cache/ to avoid repeated downloads.

Gallery

Poster Country Theme
india_grid_paper_grid_20260512_125057.png India paper_grid
india_grid_japanese_ink_20260512_134242.png India japanese_ink
pakistan_grid_electric_midnight_20260512_152527.png Pakistan electric_midnight
vietnam_grid_midnight_blue_20260512_153543.png Vietnam midnight_blue
california_grid_warm_beige_20260512_155549.png California warm_beige
mexico_grid_forest_20260512_160112.png Mexico forest
italy_grid_autumn_20260512_162023.png Italy autumn
zambia_grid_sunset_20260512_162627.png Zambia sunset

Notes

The script uses the public Overpass API through OSMnx. Large requests may fail or be rate-limited. Use smaller --tile-size-km values for large countries or when the Overpass server is busy.

The map is intended for visualisation and print design. It should not be used as an authoritative grid model.

Attribution

Map data © OpenStreetMap contributors.