TopoJSON 📊

TopoJSON (Topology-Aware JSON)

Open Beta
.topojson · application/json

TopoJSON este o extensie a GeoJSON care ține cont de topologie. Folosește codificarea cu arce partajate (granițele dintre poligoane sunt stocate o singură dată) și cuantizarea întreagă a coordonatelor — fișierul rezultat este cu 60-80% mai mic decât un GeoJSON echivalent. Format standard de intrare pentru D3.js, Mapshaper și Observable; ideal pentru hărți coroplete interactive și atlase web.

Exportă TopoJSON acum ✨ Open Beta — gratuit, fără limite

Caracteristici principale

Codificare cu arce partajate (cu 60-80% mai mic decât GeoJSON)
Cuantizare întreagă a coordonatelor
Simplificare cu păstrarea topologiei
Proprietățile obiectelor sunt păstrate

Despre formatul 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.

Ce program deschide fișierele TopoJSON

Următoarele programe și aplicații pot deschide, edita și prelucra fișiere TopoJSON (Topology-Aware JSON) (.topojson) exportate din OSM2CDR:

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

Format specifications

Cine folosește hărțile TopoJSON

🏗
Hărți coroplete interactive în D3.js
A choropleth in D3.js draws fast: shared district borders are stored and rendered once.
💻
Atlase web și publicații bazate pe hărți
A web atlas and cartographic publications where page weight matters.
📊
Hărți ușoare cu limite administrative
Administrative boundary layers that can be simplified without gaps between neighbors.
🎨
Aplicații web offline (PWA)
An offline application or a PWA: the map takes several times less space than in GeoJSON.
🗺
Analiză și vizualizare (Observable)
Exploratory analysis in Observable and notebooks — the data loads as a single small file.

Cum se exportă TopoJSON

1
Selectează zona
Desenează un dreptunghi sau un poligon pe harta interactivă de pe osm2cdr.ru
2
Alege TopoJSON
Selectează TopoJSON (Topology-Aware JSON) din lista celor 127 de formate de export disponibile
3
Exportă
Apasă Export și primește fișierul .topojson în 1-5 minute
4
Descarcă
Descarcă fișierul TopoJSON finalizat și deschide-l în D3.js

Cum se deschide fișierul după export

Hărți populare în TopoJSON

Free

Obține exporturi de hărți TopoJSON (Topology-Aware JSON)

Descarcă hărți TopoJSON profesionale din OpenStreetMap. Generare instantanee, orice zonă.

Gratuit / export
Exportă TopoJSON acum →

Întrebări frecvente

Prin ce diferă TopoJSON de GeoJSON?
Pot converti TopoJSON înapoi în GeoJSON?
De ce preferă D3.js TopoJSON?
Suportă TopoJSON 3D?
How are the layers arranged inside the file?
What is quantization and what does it affect?

Convert to TopoJSON and back

Formate înrudite

Exportate frecvent împreună

Related Articles