TopoJSON 📊

TopoJSON (Topology-Aware JSON)

Open Beta
.topojson · application/json

TopoJSON è un'estensione di GeoJSON consapevole della topologia. Usa la codifica ad archi condivisi (i confini tra poligoni vengono memorizzati una sola volta) e la quantizzazione intera delle coordinate: il file risultante è del 60-80% più piccolo di un GeoJSON equivalente. Input standard per D3.js, Mapshaper e Observable; ideale per mappe coropletiche interattive e atlanti web.

Esporta TopoJSON ora ✨ Open Beta — gratis, senza limiti

Caratteristiche principali

Codifica ad archi condivisi (60-80% più leggero di GeoJSON)
Quantizzazione intera delle coordinate
Semplificazione che preserva la topologia
Proprietà delle feature conservate

Informazioni sul formato 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.

Quale programma apre i file TopoJSON

I seguenti programmi e applicazioni possono aprire, modificare ed elaborare i file TopoJSON (Topology-Aware JSON) (.topojson) esportati da OSM2CDR:

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

Format specifications

Chi usa le mappe TopoJSON

🏗
Mappe coropletiche interattive in D3.js
A choropleth in D3.js draws fast: shared district borders are stored and rendered once.
💻
Atlanti web e pubblicazioni cartografiche
A web atlas and cartographic publications where page weight matters.
📊
Mappe leggere di confini amministrativi
Administrative boundary layers that can be simplified without gaps between neighbors.
🎨
Applicazioni web offline (PWA)
An offline application or a PWA: the map takes several times less space than in GeoJSON.
🗺
Analisi e visualizzazione (Observable)
Exploratory analysis in Observable and notebooks — the data loads as a single small file.

Come esportare in TopoJSON

1
Seleziona l'area
Disegna un rettangolo o un poligono sulla mappa interattiva su osm2cdr.ru
2
Scegli TopoJSON
Seleziona TopoJSON (Topology-Aware JSON) dall'elenco dei 127 formati di esportazione disponibili
3
Esporta
Fai clic su Esporta e ricevi il file .topojson in 1-5 minuti
4
Scarica
Scarica il file TopoJSON pronto e aprilo in D3.js

Come aprire il file dopo l'esportazione

Mappe popolari in TopoJSON

Free

Ottieni esportazioni di mappe in TopoJSON (Topology-Aware JSON)

Scarica mappe TopoJSON professionali da OpenStreetMap. Generazione istantanea, qualsiasi area.

Gratis / esportazione
Esporta TopoJSON ora →

Domande frequenti

In che cosa TopoJSON differisce da GeoJSON?
Posso riconvertire TopoJSON in GeoJSON?
Perché D3.js preferisce TopoJSON?
TopoJSON supporta il 3D?
How are the layers arranged inside the file?
What is quantization and what does it affect?

Convert to TopoJSON and back

Formati correlati

Esportati spesso insieme

Related Articles