TopoJSON 📊

TopoJSON (Topology-Aware JSON)

Open Beta
.topojson · application/json

TopoJSON është një zgjerim topologjik i GeoJSON. Përdor kodimin me harqe të përbashkëta (kufijtë midis poligoneve ruhen vetëm një herë) dhe kuantizimin me numra të plotë të koordinatave — skedari përfundimtar është 60-80% më i vogël se GeoJSON-i ekuivalent. Hyrje standarde për D3.js, Mapshaper dhe Observable; ideal për harta koropletike interaktive dhe atlase web.

Eksporto TopoJSON tani ✨ Open Beta — falas, pa kufizime

Veçoritë kryesore

✓Kodim me harqe të përbashkëta (60-80% më i vogël se GeoJSON)
✓Kuantizim me numra të plotë i koordinatave
✓Thjeshtim që ruan topologjinë
✓Vetitë e veçorive të ruajtura

Rreth formatit 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.

Çfarë programi hap skedarët TopoJSON

Programet dhe aplikacionet e mëposhtme mund të hapin, redaktojnë dhe punojnë me skedarë TopoJSON (Topology-Aware JSON) (.topojson) të eksportuar nga OSM2CDR:

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

Format specifications

Kush përdor harta TopoJSON

🏗
Harta koropletike interaktive në D3.js
A choropleth in D3.js draws fast: shared district borders are stored and rendered once.
💻
Atlase web dhe botime me bazë harte
A web atlas and cartographic publications where page weight matters.
📊
Harta të lehta të kufijve administrativë
Administrative boundary layers that can be simplified without gaps between neighbors.
🎨
Aplikacione web jashtë linje (PWA)
An offline application or a PWA: the map takes several times less space than in GeoJSON.
🗺
Analitikë dhe vizualizim (Observable)
Exploratory analysis in Observable and notebooks — the data loads as a single small file.

Si të eksportoni TopoJSON

1
Zgjidhni zonën
Vizatoni një drejtkëndësh ose poligon në hartën interaktive te osm2cdr.ru
2
Zgjidhni TopoJSON
Zgjidhni TopoJSON (Topology-Aware JSON) nga lista e 127 formateve të disponueshme të eksportit
3
Eksporto
Klikoni Eksporto dhe merrni skedarin tuaj .topojson brenda 1-5 minutave
4
Shkarko
Shkarkoni skedarin e gatshëm TopoJSON dhe hapeni në D3.js

Si ta hapni pas eksportit

Harta popullore në TopoJSON

Falas

Merrni eksporte hartash TopoJSON (Topology-Aware JSON)

Shkarkoni harta profesionale TopoJSON nga OpenStreetMap. Gjenerim i menjëhershëm, çdo zonë.

Falas / eksport
Eksporto TopoJSON tani →

Pyetjet më të shpeshta

Si dallon TopoJSON nga GeoJSON? ▼
A mund ta kthej TopoJSON-in përsëri në GeoJSON? ▼
Pse D3.js preferon TopoJSON? ▼
A e mbështet TopoJSON 3D-në? ▼
How are the layers arranged inside the file? ▼
What is quantization and what does it affect? ▼

Convert to TopoJSON and back

Formate të ngjashme

Eksportohen shpesh së bashku

Related Articles