TopoJSON: A Smaller GeoJSON with Some Neat Tricks – Nelson Minar
Channel: OpenStreetMap US
Date: 2016-06-17

TopoJSON is a serialization format for geographic data that offers efficiency through topological representation. An extension of GeoJSON, TopoJSON describes lines and polygons in terms of shared arcs. By encoding each arc only once files with overlapping geometry (such as county boundaries) are significantly smaller. Arcs are described by an efficient fixed-precision delta encoding that results in significantly smaller serialized data. Compared to their GeoJSON equivalents, OSM road databases in TopoJSON are roughly 80% the size, buildings shrink to 40%, and other geodata like coastlines and county outlines can be 30% or smaller than the original. The relative savings are maintained even after gzip compression.

In addition to smaller size, the TopoJSON encoding also enables applications to easily work on the topology of the data. For example, a chloropleth county map can draw interior borders separately from the exterior borders without extra data or calculation. The TopoJSON software package comes with useful simplification, quantization, and conversation tools. Strong browser support and a smaller wire format make TopoJSON particularly good for use in web browser maps today.