TopoJSON 📊

TopoJSON (Topology-Aware JSON)

Open Beta
.topojson · application/json

TopoJSON je topološko zavedna razširitev GeoJSON. Uporablja kodiranje s souporabljenimi loki (meje med poligoni se shranijo le enkrat) in celoštevilsko kvantizacijo koordinat — nastala datoteka je 60–80 % manjša od enakovrednega GeoJSON. Standardni vhod za D3.js, Mapshaper in Observable; idealen za interaktivne koropletne zemljevide in spletne atlase.

Izvozi TopoJSON zdaj ✨ Odprta beta — brezplačno, brez omejitev

Ključne značilnosti

Kodiranje s souporabljenimi loki (60–80 % manjše od GeoJSON)
Celoštevilska kvantizacija koordinat
Poenostavitev z ohranjanjem topologije
Lastnosti objektov ohranjene

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

Kateri program odpre datoteke TopoJSON

Naslednji programi in aplikacije lahko odprejo, urejajo in delajo z datotekami TopoJSON (Topology-Aware JSON) (.topojson), izvoženimi iz OSM2CDR:

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

Format specifications

Kdo uporablja zemljevide TopoJSON

🏗
Interaktivni koropletni zemljevidi v D3.js
A choropleth in D3.js draws fast: shared district borders are stored and rendered once.
💻
Spletni atlasi in publikacije, podprte z zemljevidi
A web atlas and cartographic publications where page weight matters.
📊
Lahki zemljevidi upravnih meja
Administrative boundary layers that can be simplified without gaps between neighbors.
🎨
Spletne aplikacije brez povezave (PWA)
An offline application or a PWA: the map takes several times less space than in GeoJSON.
🗺
Analitika in vizualizacija (Observable)
Exploratory analysis in Observable and notebooks — the data loads as a single small file.

Kako izvoziti TopoJSON

1
Izberite območje
Narišite pravokotnik ali poligon na interaktivnem zemljevidu na osm2cdr.ru
2
Izberite TopoJSON
Izberite TopoJSON (Topology-Aware JSON) s seznama 127 razpoložljivih izvoznih formatov
3
Izvoz
Kliknite Izvozi in prejmite datoteko .topojson v 1–5 minutah
4
Prenos
Prenesite pripravljeno datoteko TopoJSON in jo odprite v programu D3.js

Kako odpreti po izvozu

Priljubljeni zemljevidi v formatu TopoJSON

Brezplačno

Pridobite izvoze zemljevidov TopoJSON (Topology-Aware JSON)

Prenesite profesionalne zemljevide TopoJSON iz OpenStreetMap. Takojšnje ustvarjanje, poljubno območje.

Brezplačno / izvoz
Izvozi TopoJSON zdaj →

Pogosto zastavljena vprašanja

V čem se TopoJSON razlikuje od GeoJSON?
Ali lahko TopoJSON pretvorim nazaj v GeoJSON?
Zakaj D3.js daje prednost TopoJSON?
Ali TopoJSON podpira 3D?
How are the layers arranged inside the file?
What is quantization and what does it affect?

Convert to TopoJSON and back

Sorodni formati

Pogosto izvoženo skupaj

Related Articles