View Source ExNominatim (ExNominatim v1.0.0)

Main user-friendly functions for interacting with the endpoints of a Nominatim API.

Summary

Functions

Purpose: show internal details for an OpenStreetMap object (for debugging only) using the /details API endpoint.

Given a request params struct (%ReverseParams{}, %SearchParams{}, etc.) explain its fields, their default values (if any) and their values' limits (if applicable).

Purpose: look up address details for OpenStreetMap objects by their ID using the /lookup API endpoint.

Purpose: search OpenStreetMap objects by their location using the /reverse API endpoint.

Purpose: search OpenStreetMap objects by name or type using the /search API endpoint.

Purpose: query the status of the server at base_url using the /status API endpoint.

Functions

Link to this function

details(params)

View Source (since 1.0.0)

Purpose: show internal details for an OpenStreetMap object (for debugging only) using the /details API endpoint.

Note: You can set an alternative server as the value of the :base_url keyword and ignore any validation errors by setting the :force keyword's value to true.

Given a keyword list of request parameters as params, transform this to a %DetailsParams{} struct, validate it and its values using the ExNominatim.Validations module's functions and, if valid (or if params contains force: true to ignore any validation errors), prepare and make an HTTP request to the /details endpoint using the functions in the ExNominatim.HTTP module.

Link to this function

explain_fields(params)

View Source (since 1.0.0)

Given a request params struct (%ReverseParams{}, %SearchParams{}, etc.) explain its fields, their default values (if any) and their values' limits (if applicable).

The content shown is adapted from the Nominatim API Reference page of the endpoint corresponding to the request params struct.

The result is a map, so that you can pluck out any values if you intend to reuse them for user guidance and error reporting in your own application.

Link to this function

lookup(params)

View Source (since 1.0.0)

Purpose: look up address details for OpenStreetMap objects by their ID using the /lookup API endpoint.

Note: You can set an alternative server as the value of the :base_url keyword and ignore any validation errors by setting the :force keyword's value to true.

Given a keyword list of request parameters as params, transform this to a %LookupParams{} struct, validate it and its values using the ExNominatim.Validations module's functions and, if valid (or if params contains force: true to ignore any validation errors), prepare and make an HTTP request to the /lookup endpoint using the functions in the ExNominatim.HTTP module.

Link to this function

reverse(params)

View Source (since 1.0.0)

Purpose: search OpenStreetMap objects by their location using the /reverse API endpoint.

Note: You can set an alternative server as the value of the :base_url keyword and ignore any validation errors by setting the :force keyword's value to true.

Given a keyword list of request parameters as params, transform this to a %ReverseParams{} struct, validate it and its values using the ExNominatim.Validations module's functions and, if valid (or if params contains force: true to ignore any validation errors), prepare and make an HTTP request to the /reverse endpoint using the functions in the ExNominatim.HTTP module.

Link to this function

search(params)

View Source (since 1.0.0)

Purpose: search OpenStreetMap objects by name or type using the /search API endpoint.

Note: You can set an alternative server as the value of the :base_url keyword and ignore any validation errors by setting the :force keyword's value to true.

Given a keyword list of request parameters as params, transform this to a %SearchParams{} struct, validate it and its values using the ExNominatim.Validations module's functions and, if valid (or if params contains force: true to ignore any validation errors), prepare and make an HTTP request to the /search endpoint using the functions in the ExNominatim.HTTP module.

Link to this function

status(params \\ [format: "text"])

View Source (since 1.0.0)

Purpose: query the status of the server at base_url using the /status API endpoint.

Note: You can set an alternative server as the value of the :base_url keyword and ignore any validation errors by setting the :force keyword's value to true.

Given a keyword list of request parameters as params, transform this to a %StatusParams{} struct, validate it and its values using the ExNominatim.Validations module's functions and, if valid (or if params contains force: true to ignore any validation errors), prepare and make an HTTP request to the /status endpoint using the functions in the ExNominatim.HTTP module.