All Projects → mpenet → sextant

mpenet / sextant

Licence: other
Offline location geocoder/reverse geocoder from GeoName datasets

Programming Languages

java
68154 projects - #9 most used programming language
clojure
4091 projects
shell
77523 projects

Sextant

cljdoc badge

Offline location geocoder/reverse geocoder from GeoName datasets

Shamelessly using code from both twitter-location-parser and OfflineReverseGeocode for the reverse GeoCoding parts.

Made it clojure friendly, the geocoder and reverse geocoder both return the same record type, and implement the same protocol.

They both have ready to use components.

(require 'qbits.sextant.geocoder)
(require 'qbits.sextant)
(def g (qbits.sextant.geocoder/load))
(qbits.sextant/find-location g "paris")

=>
#qbits.sextant.Location{
 :name "Paris",
 :state-code "11",
 :country-code "FR",
 :type :city,
 :population 2138551,
 :latitude 48.85341,
 :longitude 2.3488
}

;; And from the reverse geocoder

(require 'qbits.sextant.reverse-geocoder)
(def g (qbits.sextant.reverse-geocoder/load))
(qbits.sextant/find-location g [48.85341 2.3488])

=> #qbits.sextant.Location{
    :name "Paris",
    :state-code "11",
    :country-code "FR",
    :type :city,
    :population 2138551,
    :latitude 48.85341,
    :longitude 2.3488
    }

The component is in qbits.sextant.component, it uses the same api, you just call qbits.sextant/find-location on it once it's started.

Installation

add this to your project.clj

Clojars Project

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].