TopoJSON 📊

TopoJSON (Topology-Aware JSON)

Open Beta
.topojson · application/json

TopoJSON to rozszerzenie GeoJSON uwzględniające topologię. Wykorzystuje kodowanie współdzielonych łuków (granice między wielokątami są zapisywane tylko raz) oraz kwantyzację całkowitoliczbową współrzędnych — wynikowy plik jest o 60–80% mniejszy niż równoważny GeoJSON. Standardowe dane wejściowe dla D3.js, Mapshaper i Observable; idealny do interaktywnych map kartogramowych i atlasów internetowych.

Eksportuj TopoJSON teraz ✨ Otwarta beta — bezpłatnie, bez ograniczeń

Najważniejsze funkcje

Kodowanie wspólnych łuków (60-80% mniej niż GeoJSON)
Kwantyzacja całkowitoliczbowa współrzędnych
Upraszczanie z zachowaniem topologii
Zachowane właściwości obiektów

O formacie 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.

Jaki program otwiera pliki TopoJSON

Następujące programy i aplikacje mogą otwierać, edytować i pracować z plikami TopoJSON (Topology-Aware JSON) (.topojson) wyeksportowanymi z OSM2CDR:

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

Format specifications

Kto korzysta z map TopoJSON

🏗
Interaktywne kartogramy w D3.js
A choropleth in D3.js draws fast: shared district borders are stored and rendered once.
💻
Atlasy internetowe i publikacje oparte na mapach
A web atlas and cartographic publications where page weight matters.
📊
Lekkie mapy granic administracyjnych
Administrative boundary layers that can be simplified without gaps between neighbors.
🎨
Internetowe aplikacje offline (PWA)
An offline application or a PWA: the map takes several times less space than in GeoJSON.
🗺
Analityka i wizualizacja (Observable)
Exploratory analysis in Observable and notebooks — the data loads as a single small file.

Jak wyeksportować TopoJSON

1
Zaznacz obszar
Narysuj prostokąt lub wielokąt na interaktywnej mapie pod adresem osm2cdr.ru
2
Wybierz TopoJSON
Wybierz TopoJSON (Topology-Aware JSON) z listy 127 dostępnych formatów eksportu
3
Eksportuj
Kliknij Eksportuj i otrzymaj plik .topojson w ciągu 1-5 minut
4
Pobierz
Pobierz gotowy plik TopoJSON i otwórz go w D3.js

Jak otworzyć po eksporcie

Popularne mapy w formacie TopoJSON

Darmowy

Uzyskaj eksporty map w formacie TopoJSON (Topology-Aware JSON)

Pobieraj profesjonalne mapy TopoJSON z OpenStreetMap. Natychmiastowe generowanie, dowolny obszar.

Bezpłatnie / eksport
Eksportuj TopoJSON teraz →

Najczęściej zadawane pytania

Czym TopoJSON różni się od GeoJSON?
Czy mogę przekonwertować TopoJSON z powrotem na GeoJSON?
Dlaczego D3.js preferuje TopoJSON?
Czy TopoJSON obsługuje 3D?
How are the layers arranged inside the file?
What is quantization and what does it affect?

Convert to TopoJSON and back

Powiązane formaty

Często eksportowane razem

Related Articles