TopoJSON 📊

TopoJSON (Topology-Aware JSON)

Open Beta
.topojson · application/json

TopoJSON ialah sambungan GeoJSON yang sedar topologi. Menggunakan pengekodan arka kongsi (sempadan antara poligon disimpan sekali sahaja) dan pengkuantuman koordinat integer — fail hasilnya 60-80% lebih kecil daripada GeoJSON setara. Input standard untuk D3.js, Mapshaper, dan Observable; sesuai untuk peta koroplet interaktif dan atlas web.

Eksport TopoJSON sekarang ✨ Beta Terbuka — percuma, tanpa had

Ciri Utama

Pengekodan arka kongsi (60-80% lebih kecil daripada GeoJSON)
Pengkuantuman koordinat integer
Penyederhanaan mengekalkan topologi
Sifat ciri dikekalkan

Mengenai Format 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.

Program yang Membuka Fail TopoJSON

Program dan aplikasi berikut boleh membuka, menyunting, dan bekerja dengan fail TopoJSON (Topology-Aware JSON) (.topojson) yang dieksport daripada OSM2CDR:

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

Format specifications

Siapa yang Menggunakan Peta TopoJSON

🏗
Peta koroplet interaktif dalam D3.js
A choropleth in D3.js draws fast: shared district borders are stored and rendered once.
💻
Atlas web dan penerbitan berasaskan peta
A web atlas and cartographic publications where page weight matters.
📊
Peta sempadan pentadbiran ringan
Administrative boundary layers that can be simplified without gaps between neighbors.
🎨
Aplikasi web luar talian (PWA)
An offline application or a PWA: the map takes several times less space than in GeoJSON.
🗺
Analitik dan visualisasi (Observable)
Exploratory analysis in Observable and notebooks — the data loads as a single small file.

Cara Mengeksport TopoJSON

1
Pilih kawasan
Lukis segi empat atau poligon pada peta interaktif di osm2cdr.ru
2
Pilih TopoJSON
Pilih TopoJSON (Topology-Aware JSON) daripada senarai 127 format eksport yang tersedia
3
Eksport
Klik Eksport dan terima fail .topojson anda dalam 1-5 minit
4
Muat turun
Muat turun fail TopoJSON yang siap dan buka dalam D3.js

Cara Membuka Selepas Eksport

Peta popular dalam TopoJSON

Percuma

Dapatkan eksport peta TopoJSON (Topology-Aware JSON)

Muat turun peta TopoJSON profesional daripada OpenStreetMap. Penjanaan serta-merta, sebarang kawasan.

Percuma / eksport
Eksport TopoJSON sekarang →

Soalan Lazim

Apakah perbezaan TopoJSON dengan GeoJSON?
Bolehkah saya menukar TopoJSON semula kepada GeoJSON?
Mengapa D3.js lebih gemar TopoJSON?
Adakah TopoJSON menyokong 3D?
How are the layers arranged inside the file?
What is quantization and what does it affect?

Convert to TopoJSON and back

Format Berkaitan

Kerap Dieksport Bersama

Related Articles