TopoJSON 📊

TopoJSON (Topology-Aware JSON)

Open Beta
.topojson · application/json

TopoJSON เป็นส่วนขยายของ GeoJSON ที่คำนึงถึงโทโพโลยี ใช้การเข้ารหัสแบบ shared-arc (ขอบเขตระหว่างรูปหลายเหลี่ยมถูกจัดเก็บเพียงครั้งเดียว) และการควอนไทซ์พิกัดเป็นจำนวนเต็ม — ไฟล์ที่ได้มีขนาดเล็กกว่า GeoJSON ที่เทียบเท่ากัน 60-80% เป็นข้อมูลนำเข้ามาตรฐานสำหรับ D3.js, Mapshaper และ Observable เหมาะอย่างยิ่งสำหรับแผนที่ choropleth แบบโต้ตอบและแผนที่รวมบนเว็บ

ส่งออก TopoJSON เลย ✨ Open Beta — ฟรี ไม่มีข้อจำกัด

คุณสมบัติสำคัญ

การเข้ารหัสแบบ shared-arc (เล็กกว่า GeoJSON 60-80%)
การควอนไทซ์พิกัดเป็นจำนวนเต็ม
การลดทอนความซับซ้อนที่รักษาโทโพโลยี
เก็บรักษาคุณสมบัติของฟีเจอร์

เกี่ยวกับรูปแบบ 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.

โปรแกรมใดที่เปิดไฟล์ TopoJSON ได้

โปรแกรมและแอปพลิเคชันต่อไปนี้สามารถเปิด แก้ไข และทำงานกับไฟล์ TopoJSON (Topology-Aware JSON) (.topojson) ที่ส่งออกจาก OSM2CDR ได้:

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

Format specifications

ใครใช้แผนที่ TopoJSON

🏗
แผนที่ choropleth แบบโต้ตอบใน D3.js
A choropleth in D3.js draws fast: shared district borders are stored and rendered once.
💻
แผนที่รวมบนเว็บและสิ่งพิมพ์ที่ขับเคลื่อนด้วยแผนที่
A web atlas and cartographic publications where page weight matters.
📊
แผนที่ขอบเขตการปกครองขนาดเบา
Administrative boundary layers that can be simplified without gaps between neighbors.
🎨
เว็บแอปพลิเคชันออฟไลน์ (PWA)
An offline application or a PWA: the map takes several times less space than in GeoJSON.
🗺
การวิเคราะห์และการแสดงภาพ (Observable)
Exploratory analysis in Observable and notebooks — the data loads as a single small file.

วิธีส่งออก TopoJSON

1
เลือกพื้นที่
วาดรูปสี่เหลี่ยมหรือรูปหลายเหลี่ยมบนแผนที่แบบโต้ตอบได้ที่ osm2cdr.ru
2
เลือก TopoJSON
เลือก TopoJSON (Topology-Aware JSON) จากรายการรูปแบบการส่งออก 127 รูปแบบที่มีให้
3
ส่งออก
คลิกส่งออกและรับไฟล์ .topojson ของคุณใน 1-5 นาที
4
ดาวน์โหลด
ดาวน์โหลดไฟล์ TopoJSON ที่พร้อมแล้วและเปิดใน D3.js

วิธีเปิดไฟล์หลังส่งออก

แผนที่ยอดนิยมใน TopoJSON

ฟรี

รับการส่งออกแผนที่ TopoJSON (Topology-Aware JSON)

ดาวน์โหลดแผนที่ TopoJSON ระดับมืออาชีพจาก OpenStreetMap สร้างได้ทันที ครอบคลุมทุกพื้นที่

ฟรี / การส่งออก
ส่งออก TopoJSON เลย →

คำถามที่พบบ่อย

TopoJSON แตกต่างจาก GeoJSON อย่างไร?
แปลง TopoJSON กลับเป็น GeoJSON ได้หรือไม่?
ทำไม D3.js จึงนิยมใช้ TopoJSON?
TopoJSON รองรับ 3 มิติหรือไม่?
How are the layers arranged inside the file?
What is quantization and what does it affect?

Convert to TopoJSON and back

รูปแบบที่เกี่ยวข้อง

มักส่งออกพร้อมกัน

Related Articles