Read and write TopoJSON to and from GeoJSON, in clojure.
Include the dependency in your project:
This convert a TopoJSON structure to a GeoJSON data structure.
(use ['topojson.reader :only ('topo2geo 'read-json)])
(def topojson (read-json "example.topo.json"))
(def geojson (topo2geo topojson))
This converts a GeoJSON into a TopoJSON structure.
(use ['topojson.reader :only ('read-json)])
(use ['topojson.writer :only ('geo2topo)])
(def geojson (read-json "example.geo.json"))
(def topojson (geo2topo geojson))
MIT