Usage
import topojson
topology = topojson.read(file) # (1)!
topology.write(file) # (2)!
land = topology.objects["land"]
features = topojson.feature(topology, land) # (3)!
features = topology.feature("land") # (4)!
features.write(file) # (5)!
mesh = topojson.mesh(topology, land, filter=None) # (6)!
mesh = topology.mesh("land", filter=None) # (7)!
mesh.write(file) # (8)!
objects = topology.objects["counties"].geometries
merge = topojson.merge(objects) # (9)!
merge = topology.merge("counties") # (10)!
merge.write(file) # (11)!
objects = list(topology["objects"].values())
neighbors = topojson.neighbors(objects) # (12)!
neighbors = topology.neighbors(list(topology["objects"].keys())) # (13)!
bbox = topojson.bbox(topology) # (14)!
bbox = topology.compute_bbox() # (15)!
quantize = topojson.quantize(topology, 1e4) # (16)!
quantize = topology.quantize(1e4) # (17)!
quantize.write(file) # (18)!
- See topojson.read
- See TopoJSON.write
- See topojson.feature
- See TopoJSON.feature
- See GeoJSON_FeatureCollection.write and GeoJSON_Feature.write
- See topojson.mesh
- See TopoJSON.mesh
- See FeatureGeometryType_MultiLineString.write
- See topojson.merge
- See TopoJSON.merge
- See FeatureGeometryType_MultiLineString.write
- See topojson.neighbors
- See TopoJSON.neighbors
- See topojson.bbox
- See TopoJSON.compute_bbox
- See topojson.quantize
- See TopoJSON.quantize
- See TopoJSON.write