OSM Geo (OpenStreetMap)

Grid topology analysis (nodes, edges, graph metrics, optional path analysis)

Analyses the visible grid topology within an area by extracting nodes (substations, transformers) and edges (lines, cables) directly from OpenStreetMap via Overpass (src/osm-grid-topology.js — computed locally, no external mcp.cernion.de dependency for this action).

Graph model: nodes = OSM elements tagged power=substation/power=transformer; edges = derived by walking each power=line|cable|minor_line way's ordered node list and connecting consecutive pairs of those nodes found along it. Towers/poles are not modelled as graph nodes, so a line touching zero or one node of interest within the bbox contributes no edge from that way — a legitimate boundary effect, not missing data.

Graph metrics returned:

  • Node and edge counts, average node degree
  • Topology type: RADIAL (indicator < 0.5), MIXED (0.5–0.7), RING (> 0.7 — higher redundancy). Indicator = cyclomatic number (E − V + components) normalised by edge count.
  • Voltage-level breakdown (NS/MS/HS/EHS, classified from the OSM voltage tag)

Optional path analysis (includePathAnalysis: true): shortest path between fromOsmId → toOsmId (Dijkstra over derived edge lengths) with hop count, total length, and confidence rating.

Optional raw graph data (includeGraphData: true): full node/edge list for downstream processing.

Scope input: at least one of location (place name), postalCode, boundingBox, or gridOperator name. Named-place/postalCode/gridOperator scopes are forward-geocoded to a bounding box via Nominatim; boundingBox is used directly.

Data: © OpenStreetMap contributors, ODbL 1.0

post/api/osm-geo/grid-topology

Request

  • Base URL: https://api.cernion.de
  • URL: https://api.cernion.de/api/osm-geo/grid-topology
  • Auth: none declared

Query parameters

tokenstring

Optional Cernion MCP token as URL query parameter. If provided, it overrides CERNION_TOKEN for this request. Prefer Authorization Bearer header in production to reduce token exposure in URLs/logs.

Request body

locationstring

Area name (Gemeinde, Stadt, Landkreis).

postalCodestring

German PLZ (postal code). Combined with location when both are provided (e.g. "74909 Meckesheim"). Can be used alone for PLZ-scoped queries.

gridOperatorstring

VNB name — used as OSM area name.

voltageLevelstring

Restrict analysis to one voltage level: NS, MS, HS, EHS.

fromOsmIdstring

Start-node OSM ID for path analysis (e.g. "node/1234567").

toOsmIdstring

Target-node OSM ID for path analysis.

includePathAnalysisboolean

Compute shortest path between fromOsmId → toOsmId.

includeGraphDataboolean

Include raw node/edge list for downstream processing.

tokenstring

Optional Cernion MCP token for this request. Overrides CERNION_TOKEN when provided.

Example request

{
  "location": "Ludwigshafen am Rhein",
  "postalCode": "74909",
  "boundingBox": {
    "north": 49.548,
    "south": 49.427,
    "east": 8.477,
    "west": 8.298
  },
  "gridOperator": "STROMDAO Netze GmbH",
  "voltageLevel": "MS",
  "fromOsmId": "node/123456789",
  "toOsmId": "node/987654321"
}

Response

Topology analysis returned successfully

Changes

No recorded changes to this operation across all 2 revisions of this API.