Read and Write TopoJSON in Clojure.
JavaScript Clojure
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
resources
src/topojson
test
.gitignore
README.md
project.clj

README.md

topojson

Read and write TopoJSON to and from GeoJSON, in clojure.

Usage

Include the dependency in your project:

Clojars Project

Reading

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))

Writing

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))

License

MIT