TopoJSON 📊

TopoJSON (Topology-Aware JSON)

Open Beta
.topojson · application/json

TopoJSON je topologicky orientované rozšíření GeoJSON. Používá kódování sdílených oblouků (hranice mezi polygony se ukládají jen jednou) a celočíselnou kvantizaci souřadnic – výsledný soubor je o 60–80 % menší než ekvivalentní GeoJSON. Standardní vstup pro D3.js, Mapshaper a Observable; ideální pro interaktivní choroplethové mapy a webové atlasy.

Exportovat TopoJSON hned ✨ Otevřená beta — zdarma, bez omezení

Klíčové vlastnosti

Kódování sdílených oblouků (o 60–80 % menší než GeoJSON)
Celočíselná kvantizace souřadnic
Zjednodušení zachovávající topologii
Zachované vlastnosti prvků

O formátu TopoJSON

TopoJSON was invented by Mike Bostock, the author of D3.js, to solve a simple problem: in GeoJSON neighboring polygons store their shared border twice. TopoJSON moves all the lines into a common array of arcs that the objects then refer to. On top of that, coordinates are rounded to an integer grid and written as increments — the file gets sharply lighter.

The format is taken for web graphics and analytics: choropleths in D3, interactive atlases, boundary maps in Observable, lightweight layers for offline applications. The second motive is simplification: during generalization the shared borders move together, and no gaps appear between neighboring districts.

The output is a single document: every layer becomes a separate object inside it — roads, buildings, water and so on — and object attributes are preserved. Coordinates are in WGS84, up to 100,000 objects per layer. The topology is built by our own code, with no external dependencies.

The price of compactness is the rounding of coordinates. The grid step depends on the size of the area: for a district it is on the order of a meter, for a country hundreds of meters. For a web map that is invisible; for precise measurements take GeoJSON or GeoPackage.

Jaký program otevírá soubory TopoJSON

Následující programy a aplikace dokážou otevřít, upravit a zpracovat soubory TopoJSON (Topology-Aware JSON) (.topojson) exportované z OSM2CDR:

💻D3.js 💻Mapshaper 💻topojson-server 💻topojson-client 💻Observable 💻ndjson-cli

Format specifications

Kdo používá mapy TopoJSON

🏗
Interaktivní choroplethové mapy v D3.js
A choropleth in D3.js draws fast: shared district borders are stored and rendered once.
💻
Webové atlasy a publikace založené na mapách
A web atlas and cartographic publications where page weight matters.
📊
Odlehčené mapy správních hranic
Administrative boundary layers that can be simplified without gaps between neighbors.
🎨
Offline webové aplikace (PWA)
An offline application or a PWA: the map takes several times less space than in GeoJSON.
🗺
Analytika a vizualizace (Observable)
Exploratory analysis in Observable and notebooks — the data loads as a single small file.

Jak exportovat TopoJSON

1
Vyberte oblast
Nakreslete obdélník nebo polygon na interaktivní mapě na osm2cdr.ru
2
Zvolte TopoJSON
Vyberte TopoJSON (Topology-Aware JSON) ze seznamu 127 dostupných exportních formátů
3
Export
Klikněte na Exportovat a obdržíte soubor .topojson během 1–5 minut
4
Stáhnout
Stáhněte si hotový soubor TopoJSON a otevřete jej v D3.js

Jak soubor otevřít po exportu

Oblíbené mapy ve formátu TopoJSON

Zdarma

Získejte mapové exporty ve formátu TopoJSON (Topology-Aware JSON)

Stáhněte si profesionální mapy TopoJSON z OpenStreetMap. Okamžité generování, libovolná oblast.

Zdarma / export
Exportovat TopoJSON hned →

Časté dotazy

Čím se TopoJSON liší od GeoJSON?
Mohu převést TopoJSON zpět na GeoJSON?
Proč D3.js upřednostňuje TopoJSON?
Podporuje TopoJSON 3D?
How are the layers arranged inside the file?
What is quantization and what does it affect?

Convert to TopoJSON and back

Související formáty

Často exportováno společně

Related Articles