James Sofra


Organiser of clj-melb

James broke out of academia half a decade ago and found a home at the Bureau of Meteorology. Whilst bending Java and Python to breaking point working on forecasting systems James developed an interest in spatial data and GIS applications. After some time wrestling with Java professionally he went looking for something new and found it in the form of Clojure, Erlang and Haskell. James co-founded clj-melb, the Clojure Melbourne User Group, and is keen to spent more time encouraging others to give FP a shot.

YOW! Lambda Jam 2014 Brisbane

Spatial Indexing for Datomic using Clojure


Datomic is an interesting new database that attempts to bring much of the benefits of functional programming to the database arena, with a focus on immutability. Datomic separates out the traditional tasks of a database allowing rich queries to be performed at the application level. In this talk attendees will learn about how this ability, along with the functional aspects, make Datomic an attractive option for storing spatial data (coordinates, polygons, etc.). Efficiently querying spatial data requires some form of spatial indexing. I will show how I leveraged the ability for Datomic to describe arbitrary data structures and wrote a spatial indexer for Datomic in Datomic (and Clojure) it’s self. I will provide a short walk through of the implementation, describing the algorithms and techniques used, including R-Trees and Hilbert Curves.