TopoJSON 📊

TopoJSON (Topology-Aware JSON)

Open Beta
.topojson · application/json

TopoJSON on GeoJSON:in topologian huomioiva laajennus. Käyttää jaettujen kaarien koodausta (polygonien väliset rajat tallennetaan vain kerran) ja koordinaattien kokonaislukukvantisointia – tuloksena oleva tiedosto on 60–80 % pienempi kuin vastaava GeoJSON. Vakiosyöte D3.js:lle, Mapshaperille ja Observablelle; ihanteellinen interaktiivisiin koropleettikarttoihin ja verkkoatlaksiin.

Vie TopoJSON nyt ✨ Avoin beta — ilmainen, ei rajoituksia

Keskeiset ominaisuudet

Jaettujen kaarien koodaus (60–80 % pienempi kuin GeoJSON)
Koordinaattien kokonaislukukvantisointi
Topologian säilyttävä yksinkertaistus
Kohteen ominaisuudet säilyvät

Tietoa TopoJSON-muodosta

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.

Mikä ohjelma avaa TopoJSON-tiedostot

Seuraavat ohjelmat ja sovellukset voivat avata ja muokata OSM2CDR:stä vietyjä TopoJSON (Topology-Aware JSON) (.topojson) -tiedostoja sekä työskennellä niiden parissa:

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

Format specifications

Ketkä käyttävät TopoJSON-karttoja

🏗
Interaktiiviset koropleettikartat D3.js:ssä
A choropleth in D3.js draws fast: shared district borders are stored and rendered once.
💻
Verkkoatlakset ja karttapohjaiset julkaisut
A web atlas and cartographic publications where page weight matters.
📊
Kevyet hallinnollisten rajojen kartat
Administrative boundary layers that can be simplified without gaps between neighbors.
🎨
Offline-verkkosovellukset (PWA)
An offline application or a PWA: the map takes several times less space than in GeoJSON.
🗺
Analytiikka ja visualisointi (Observable)
Exploratory analysis in Observable and notebooks — the data loads as a single small file.

Näin viet kartan muotoon TopoJSON

1
Valitse alue
Piirrä suorakulmio tai monikulmio interaktiiviselle kartalle osoitteessa osm2cdr.ru
2
Valitse TopoJSON
Valitse TopoJSON (Topology-Aware JSON) 127 saatavilla olevan vientimuodon luettelosta
3
Vie
Napsauta Vie ja saat .topojson-tiedostosi 1–5 minuutissa
4
Lataa
Lataa valmis TopoJSON-tiedosto ja avaa se ohjelmassa D3.js

Kuinka avata viennin jälkeen

Suositut TopoJSON-kartat

Ilmainen

Hanki TopoJSON (Topology-Aware JSON) -karttavientejä

Lataa ammattilaistason TopoJSON-karttoja OpenStreetMapista. Luodaan välittömästi mistä tahansa alueesta.

Ilmainen / vienti
Vie TopoJSON nyt →

Usein kysytyt kysymykset

Miten TopoJSON eroaa GeoJSON:ista?
Voinko muuntaa TopoJSON:in takaisin GeoJSON:iksi?
Miksi D3.js suosii TopoJSON:ia?
Tukeeko TopoJSON 3D:tä?
How are the layers arranged inside the file?
What is quantization and what does it affect?

Liittyvät muodot

Usein viedään yhdessä

Related Articles