Skip to main content

TopoJSON Format

Read TopoJSON topologies as GeoJSON-like features (when topojson is installed); write buffered geometries as a Topology on close.

Overview

PropertyValue
Format idtopojson
ClassTopoJSONIterable
Extensions.topojson
ReadYes
WriteYes
Extratopojson (topojson)
Maturitystable

Record shape

On read with the library available, Feature / FeatureCollection members. Without it (or on streaming large files via ijson), raw topology objects may be returned instead. Writes accept geometry dicts buffered into one Topology on close().

Usage

from iterable import open_iterable

with open_iterable("map.topojson") as source:
for feature in source:
print(feature.get("type"), feature.get("geometry"))

Install with pip install iterabledata[topojson].

See also