ExNominatim

ExNominatim is a full-featured client for the OpenStreetMapNominatim API V1, with extensive request validation, robust error-handling and reporting, and user guidance with helpful validation messages.

Goals

Features

Installation

The package can be installed from Hex by adding ex_nominatim to your list of dependencies in mix.exs:

def deps do
  [
    {:ex_nominatim, "~> 1.1.1"}
  ]
end

The code can be found on Github/waseigo/ex_nominatim.

Documentation has been published on HexDocs.

There is also a thread open on the Elixir Programming Language Forum: ExNominatim - A full-featured client for the OpenStreetMap Nominatim API V1.

Usage

By calling the endpoint functions of the ExNominatim module you will be hitting the public Nominatim API server with each endpoint’s default options as described in the API documentation; i.e., all requests use https://nominatim.openstreetmap.org as the value of :base_url in opts and the default parameters for each endpoint are handled by the API according to its documentation.

Please respect the Nominatim Usage Policy when using the public server.

Optional configuration and default parameters

In the more likely scenario where you use ExNominatim in your own application (e.g., in a Phoenix application) called MyApp, you can override all defaults across all endpoints and then even for each endpoint through your application’s configuration, e.g. in the config/config.exs file of a Phoenix app. For example:

config :my_app, MyApp.ExNominatim,
  all: [
    base_url: "http://localhost:8080",
    force: true,
    format: "json",
    process: true,
    atomize: true
  ],
  search: [format: "geocodejson", force: false],
  reverse: [namedetails: 1],
  lookup: [],
  details: [],
  status: [format: "json"]

The configuration above has the following effects:

Refer to the documentation of the main ExNominatim module for more information.

Ideas and someday/maybe features

Who made this?

Copyright 2024, made by Isaak Tsalicoglou, OVERBRING in Athens, Attica, Greece.

Many thanks to all the volunteers and contributors of OpenStreetMap and Nominatim.