Skip to content

diogok/topojson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published