You are trying the new MyGeodata Cloud. Send feedback Back to the previous version

Vector · Web & JSON

TopoJSON — TopoJSON (topological GeoJSON)

GeoJSON extension that encodes vector topology as shared, quantized arcs to reduce file size for web maps.

Type
Vector · Web & JSON
Extension
.topojson, .json
Converter
Read & write
Coordinate system
Any; WGS 84 (EPSG:4326) by default (not recorded in the file)
Layers
Multiple

What is a TopoJSON file?

TopoJSON is an extension of GeoJSON that encodes topology. Instead of storing the full coordinates of every geometry, it keeps a shared list of arcs, and each line or polygon is defined by references to those arcs, so a border shared by two neighbouring polygons is stored only once. Coordinates are usually quantized to integers and delta-encoded, with a transform of scale and translate values that restores real positions. The format was created by Mike Bostock and is published as an open specification in the TopoJSON project on GitHub.

TopoJSON is mainly used in web cartography, especially for administrative boundaries and choropleth maps rendered with D3.js, where compact files matter. A single file can contain several named objects, each holding geometries with properties. No coordinate reference system is mandated. Data are typically WGS 84 longitude/latitude, but projected coordinates are possible. Simplifying shared arcs keeps adjacent polygons free of gaps and overlaps.

TopoJSON files are usually exchanged between web developers, data journalists and cartographers who prepare boundary data for browser maps. Because geometries refer to shared arcs and coordinates are often quantized, the file cannot be read like plain GeoJSON. Check that the transform is applied, that the right named object is selected, and that simplification or quantization did not remove needed detail.

Typical uses

  • Publishing compact administrative boundaries for web maps.
  • Feeding choropleth maps built with D3.js or Vega-Lite.
  • Simplifying neighbouring polygons without creating gaps or overlaps.
  • Storing several named geometry sets in one downloadable file.
Files: JSON with shared arc topology; reduces duplication in boundaries.

Sample TopoJSON files — free download

Small, real datasets of the island of Saint Helena (OpenStreetMap, Copernicus DEM, Sentinel-2). Download them, open them in your software, or convert them in one click.

Preview of the sample data: Saint Helena land cover st-helena-landcover.topojson

Land cover (polygons)

190 land-cover polygons (forest, scrub, farmland, residential, water, …) from OpenStreetMap with area in hectares. TopoJSON topology with quantized arcs.

  • landcover · Polygon · 190
  • EPSG:4326
  • 81.9 kB
Attributes (6)
idIntegerlandcoverStringosm_classStringnameStringarea_haRealosm_idString
1beachbeachNone0.6241102771696
2beachbeachSandy Bay Beach0.557550627544
3farmlandfarmlandNone4.50235798087
4farmlandfarmlandNone4.10835798079
5farmlandfarmlandNone3.73535798064

© OpenStreetMap contributors, ODbL 1.0

Preview of the sample data: Saint Helena basemap st-helena-basemap.topojson

Basemap (4 objects)

Saint Helena places, roads, waterways and land cover as four TopoJSON objects in one topology.

  • landcover · Polygon · 190
  • waterways · LineString · 117
  • roads · LineString · 110
  • places · Point · 58
  • EPSG:4326
  • 189.8 kB
Attributes (3)
nameStringarea_km2Realosm_idString
Saint Helena122.914868269

© OpenStreetMap contributors, ODbL 1.0 · Copernicus DEM © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA

Frequently asked questions

GeoJSON stores full coordinates for every geometry, so shared borders are duplicated. TopoJSON stores each shared border once as an arc and geometries reference those arcs, which usually makes files smaller and keeps neighbouring shapes consistent.

Ready to convert your data?

Drop the files and the Converter does the rest — no install, no account needed for your first conversions.