TopoJSON 📊

TopoJSON (Topology-Aware JSON)

Open Beta
.topojson · application/json

‏TopoJSON הוא הרחבה של GeoJSON המודעת לטופולוגיה. הוא משתמש בקידוד קשתות משותפות (גבולות בין מצולעים נשמרים פעם אחת בלבד) ובקוונטיזציה שלמה של קואורדינטות — הקובץ המתקבל קטן ב-60–80% מ-GeoJSON המקביל. קלט תקני עבור D3.js, ‏Mapshaper ו-Observable; אידיאלי למפות כורופלת אינטראקטיביות ולאטלסי אינטרנט.

ייצוא TopoJSON עכשיו ✨ Open Beta — חינם, ללא הגבלות

תכונות עיקריות

קידוד קשתות משותפות (קטן ב-60–80% מ-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) מתוך רשימת 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 תומך בתלת-ממד?
How are the layers arranged inside the file?
What is quantization and what does it affect?

Convert to TopoJSON and back

פורמטים קשורים

מיוצאים יחד לעיתים קרובות

Related Articles