TopoJSON 📊

TopoJSON (Topology-Aware JSON)

Open Beta
.topojson · application/json

TopoJSON er leiðafræðimeðvituð útvíkkun á GeoJSON. Notar samnýtta boga (mörk milli marghyrninga geymd aðeins einu sinni) og heiltölukvörðun hnita — niðurstöðuskráin er 60–80% minni en sambærilegt GeoJSON. Stöðluð inntak fyrir D3.js, Mapshaper og Observable; tilvalið fyrir gagnvirk gildiskort og vefatlasa.

Flytja út TopoJSON núna ✨ Opin beta-prófun — ókeypis, engar takmarkanir

Helstu eiginleikar

Samnýtt boga-kóðun (60–80% minna en GeoJSON)
Heiltölukvörðun hnita
Leiðafræðivarðveitandi einföldun
Eiginleikar fyrirbæra varðveittir

Um TopoJSON-sniðið

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.

Hvaða forrit opnar TopoJSON-skrár

Eftirfarandi forrit geta opnað, breytt og unnið með TopoJSON (Topology-Aware JSON) (.topojson) skrár sem fluttar eru út úr OSM2CDR:

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

Format specifications

Hverjir nota TopoJSON-kort

🏗
Gagnvirk gildiskort í D3.js
A choropleth in D3.js draws fast: shared district borders are stored and rendered once.
💻
Vefatlasar og kortadrifnar útgáfur
A web atlas and cartographic publications where page weight matters.
📊
Létt kort af stjórnsýslumörkum
Administrative boundary layers that can be simplified without gaps between neighbors.
🎨
Ótengd vefforrit (PWA)
An offline application or a PWA: the map takes several times less space than in GeoJSON.
🗺
Greining og myndsetning (Observable)
Exploratory analysis in Observable and notebooks — the data loads as a single small file.

Hvernig á að flytja út TopoJSON

1
Veldu svæði
Teiknaðu rétthyrning eða marghyrning á gagnvirka kortinu á osm2cdr.ru
2
Veldu TopoJSON
Veldu TopoJSON (Topology-Aware JSON) úr listanum yfir 127 fáanleg útflutningssnið
3
Flytja út
Smelltu á Flytja út og fáðu .topojson-skrána þína eftir 1-5 mínútur
4
Sækja
Sæktu tilbúnu TopoJSON-skrána og opnaðu hana í D3.js

Hvernig á að opna eftir útflutning

Vinsæl kort í TopoJSON

Free

Fáðu kortaútflutning í TopoJSON (Topology-Aware JSON)

Sæktu fagleg TopoJSON-kort úr OpenStreetMap. Tafarlaus kortagerð, hvaða svæði sem er.

Ókeypis / útflutningur
Flytja út TopoJSON núna →

Algengar spurningar

Hvernig er TopoJSON frábrugðið GeoJSON?
Get ég breytt TopoJSON aftur í GeoJSON?
Hvers vegna kýs D3.js TopoJSON?
Styður TopoJSON þrívídd?
How are the layers arranged inside the file?
What is quantization and what does it affect?

Convert to TopoJSON and back

Tengd snið

Oft flutt út saman

Related Articles