Skip to content

uxeon/erlgeo

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

erlgeo

An Erlang application/library for geocoding.

Warning

This is an early release, API may and will change until we reach 1.0.0. For more information see Roadmap at the end of this document.

Features

Quick start

# clone
$ git clone git://github.com/uxeon/erlgeo.git
$ cd erlgeo

# Configure
# Put your API key into config/sys.config
# (or check above file to add proper config to your app`s sys.config)

# Testing in Erlang shell
$ make start
1> application:ensure_all_started(erlgeo).
2> erlgeo:reverse(20.0,50.0).
3> erlgeo:forward("Aleje Jerozolimskie 214, Warszawa").
4> erlgeo:forward(<<"Aleje Jerozolimskie 214, Warszawa">>).

Options

You can use reverse/3 or forward/2 to provide options list. Options names are consistent with OpenCage API options:

  • erlgeo:reverse(Lon,Lat,[no_annotations])
  • erlgeo:reverse(Lon,Lat,[no_dedupe])
  • erlgeo:reverse(Lon,Lat,[no_record])
  • erlgeo:reverse(Lon,Lat,[{language,"pl"}]) or erlgeo:reverse(Lon,Lat,[{language,<<"pl">>}])
  • erlgeo:reverse(Lon,Lat,[{min_confidence,10}])
  • erlgeo:reverse(Lon,Lat,[{limit,5}])

See OpenCage API documentation for more information.

Dependencies

This library requires jsone library as specified in rebar.config. It could be independent by using xmerl instead. However UXEON already uses jsone in other applications so we do not consider switching to xmerl an important task. Current jsone dependent version is probably faster than theoretical xmerl version.

Roadmap

  • Full OpenCage API support
  • Caching support

About

Erlang geocoder

Resources

License

Stars

Watchers

Forks

Packages

No packages published