TopoJSON 📊

TopoJSON (Topology-Aware JSON)

Open Beta
.topojson · application/json

TopoJSON је проширење GeoJSON-а свесно топологије. Користи кодирање заједничких лукова (границе између полигона се чувају само једном) и целобројну квантизацију координата — резултујући фајл је 60-80% мањи од еквивалентног GeoJSON-а. Стандардни улаз за D3.js, Mapshaper и Observable; идеалан за интерактивне хороплет карте и веб-атласе.

Извезите TopoJSON одмах ✨ Отворена бета — бесплатно, без ограничења

Кључне могућности

Кодирање заједничких лукова (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 подржава 3D?
How are the layers arranged inside the file?
What is quantization and what does it affect?

Convert to TopoJSON and back

Сродни формати

Често се извозе заједно

Related Articles