TopoJSON eliminates redundancy, allowing related geometries to be stored efficiently in the same file. For example, the shared boundary between California and Nevada is represented only once, rather than being duplicated for both states. A single TopoJSON file can contain multiple feature collections without duplication, such as states and counties. Or, a TopoJSON file can efficiently represent both polygons (for fill) and boundaries (for stroke) as two feature collections that share the same arc mesh. See How To Infer Topology for a visual explanation of how TopoJSON works. See Command-Line Cartography for an introduction to TopoJSON and related tools. See TopoJSON Format Specification for the format specification. To further reduce file size, TopoJSON can use quantized delta-encoding for integer coordinates. This is similar to rounding coordinate values (e.g., LilJSON), but with greater efficiency and control over loss of information.
Features
- TopoJSON is substantially more compact than GeoJSON
- Encoding topology also has numerous useful applications for maps and visualization above
- It allows topology-preserving shape simplification
- Ensures that adjacent features remain connected after simplification
- Topology can also be used for Dorling or hexagonal cartograms
- TopoJSON can use quantized delta-encoding for integer coordinates