TopoJSON 📊

TopoJSON (Topology-Aware JSON)

Open Beta
.topojson · application/json

TopoJSON گونه‌ای توپولوژی‌آگاه از GeoJSON است. از رمزگذاری کمان مشترک استفاده می‌کند (مرزهای میان چندضلعی‌ها تنها یک بار ذخیره می‌شوند) و مختصات را به‌صورت صحیح کوانتیده می‌کند — فایل حاصل ۶۰ تا ۸۰٪ کوچک‌تر از GeoJSON معادل است. ورودی استاندارد برای D3.js، Mapshaper و Observable؛ ایده‌آل برای نقشه‌های کروپلت تعاملی و اطلس‌های وب.

همین حالا TopoJSON را خروجی بگیرید ✨ بتای باز — رایگان، بدون محدودیت

ویژگی‌های کلیدی

رمزگذاری کمان مشترک (۶۰ تا ۸۰٪ کوچک‌تر از GeoJSON)
کوانتش صحیح مختصات
ساده‌سازی با حفظ توپولوژی
حفظ ویژگی‌های عارضه

دربارهٔ قالب 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 استفاده می‌کنند

🏗
نقشه‌های کروپلت تعاملی در 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) را از فهرست ۱۲۷ قالب خروجی موجود انتخاب کنید
3
خروجی
روی خروجی کلیک کنید و فایل .topojson خود را در ۱ تا ۵ دقیقه دریافت کنید
4
دانلود
فایل آمادهٔ TopoJSON را دانلود کنید و آن را در D3.js باز کنید

نحوه باز کردن پس از خروجی

نقشه‌های محبوب در TopoJSON

رایگان

خروجی نقشهٔ TopoJSON (Topology-Aware JSON) را دریافت کنید

نقشه‌های حرفه‌ای TopoJSON را از OpenStreetMap دانلود کنید. تولید آنی برای هر ناحیه.

رایگان / هر خروجی
همین حالا TopoJSON را خروجی بگیرید →

پرسش‌های متداول

تفاوت TopoJSON با GeoJSON چیست؟
آیا می‌توانم TopoJSON را دوباره به GeoJSON تبدیل کنم؟
چرا D3.js قالب TopoJSON را ترجیح می‌دهد؟
آیا TopoJSON از سه‌بعدی پشتیبانی می‌کند؟
How are the layers arranged inside the file?
What is quantization and what does it affect?

Convert to TopoJSON and back

قالب‌های مرتبط

قالب‌هایی که اغلب همراه با هم خروجی گرفته می‌شوند

Related Articles