All Projects → tonytw1 → Nominatim Ac

tonytw1 / Nominatim Ac

Elasticsearch backed place name autocomplete based on Open Street Map Nominatim data

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Nominatim Ac

Osmtogeojson
convert osm to geojson
Stars: ✭ 493 (+4381.82%)
Mutual labels:  openstreetmap
Abstreet
Transportation planning and traffic simulation software for creating cities friendlier to walking, biking, and public transit
Stars: ✭ 6,355 (+57672.73%)
Mutual labels:  openstreetmap
Osm Testdata
OpenStreetMap Test Data.
Stars: ✭ 24 (+118.18%)
Mutual labels:  openstreetmap
Mapscii
🗺 MapSCII is a Braille & ASCII world map renderer for your console - enter => telnet mapscii.me <= on Mac (brew install telnet) and Linux, connect with PuTTY on Windows
Stars: ✭ 5,886 (+53409.09%)
Mutual labels:  openstreetmap
Openrouteservice
🌍 The open source route planner api with plenty of features.
Stars: ✭ 614 (+5481.82%)
Mutual labels:  openstreetmap
Utymap
Highly customizable library for procedural world generation based on real map data
Stars: ✭ 825 (+7400%)
Mutual labels:  openstreetmap
Timezone Boundary Builder
A tool to extract data from Open Street Map (OSM) to build the boundaries of the world's timezones.
Stars: ✭ 469 (+4163.64%)
Mutual labels:  openstreetmap
Osmium Filter
Fast filter for OSM data
Stars: ✭ 9 (-18.18%)
Mutual labels:  openstreetmap
Map Matching
The map matching functionality is now located in the main repository https://github.com/graphhopper/graphhopper#map-matching
Stars: ✭ 665 (+5945.45%)
Mutual labels:  openstreetmap
Osmium Contrib
Mixed more or less useful programs using the Osmium library
Stars: ✭ 18 (+63.64%)
Mutual labels:  openstreetmap
Blender Osm
One click download and import of OpenStreetMap and terrain for Blender! Global coverage! Source code is in the branch 'release'.
Stars: ✭ 588 (+5245.45%)
Mutual labels:  openstreetmap
Umap
uMap lets you create maps with OpenStreetMap layers in a minute and embed them in your site.
Stars: ✭ 609 (+5436.36%)
Mutual labels:  openstreetmap
Osm4j Core
Core components of osm4j
Stars: ✭ 16 (+45.45%)
Mutual labels:  openstreetmap
Barefoot
Java map matching library for integrating the map into software and services with state-of-the-art online and offline map matching that can be used stand-alone and in the cloud.
Stars: ✭ 541 (+4818.18%)
Mutual labels:  openstreetmap
Osm2geojson
Convert OSM and Overpass JSON to GeoJSON
Stars: ✭ 25 (+127.27%)
Mutual labels:  openstreetmap
Tilemaker
Make OpenStreetMap vector tiles without the stack
Stars: ✭ 468 (+4154.55%)
Mutual labels:  openstreetmap
Osm2xmap
Converter from OpenStreetMap data format to OpenOrienteering Mapper format.
Stars: ✭ 5 (-54.55%)
Mutual labels:  openstreetmap
Osmnx Examples
Usage examples, demos, and tutorials for OSMnx.
Stars: ✭ 863 (+7745.45%)
Mutual labels:  openstreetmap
Wikimama
Scripts to help matching OSM features to Wikidata items
Stars: ✭ 8 (-27.27%)
Mutual labels:  openstreetmap
Osmproxy
OpenStreetMap tile proxy for REDAXO
Stars: ✭ 17 (+54.55%)
Mutual labels:  openstreetmap

An experimental Open Street Map (OSM) / Nominatim place name auto-complete service.

Indexes the contents of a Nominatim 3.1 database into Elasticsearch version 6.

End points

/search

Parameter Description
q The user query. ie. London
tag Restrict results to a given OSM tag.
lat / lon / radius Restrict results to a given geocircle
country Restrict results to a given country code
callback The name of an optional JSONP callback to wrap the results in

Motivation

Allowing users to tag content with just a latitude/longitude point loses alot of the context. Was the user referring to a country, a city or a specific building when they applied the tag?

Can OSM data be used to provide a user friendly auto complete place name service which preserves context by assigning a repeatable location id to each result?

Background

Many existing location lookup services resolve to a point location only. The Google Maps geocoding service does provide some context information, but lacks ids which can be advertised and referred back to at a later date (update - no longer true).

Some services such as Twitter and Instagram expose their own in-house ids for locations. The data sets which these ids refer to aren't available to 3rd party developers.

OSM does provide publicly accessible ids for locations. Resolving the fairly basic OSM schema into a hierarchy is a fairly complicated task. This has been tackled by the Nominatim project (http://wiki.openstreetmap.org/wiki/Nominatim).

This means we can infer things like 'if this content is tagged with that street, then it must also be relevant to this city and this country'. OSM ids are public so we can advertise them and be confident that other applications can make use of that information.

Nominatims' terms and conditions state that it shouldn't be used as an auto complete service. This is fair. Using Nominatim in this manner would result in alot of expensive database queries.

Overview

This code base dumps out the contents of a populated Nominatim postgres instance into Elasticsearch which is then exposed as a JSON web service.

This service is able to quickly respond to key stokes as the Nominatim output has been pre-rendered and indexed and does not need to be calculated in real time. The Elasticsearch index can be distributed to smaller machines than those needed to run a whole planet Nominatim instance.

The Nominatim place name and OSM id is made available in the JSON returned to clients. The calling application can now persist the OSM id of the selected result for future reference.

Implementation

Java / Spring Boot and Elasticsearch.

An example install containing the whole planet data set is available at https://nominatim-ac.eelpieconsulting.co.uk

Also see

photon (http://photon.komoot.de/) takes a similar approach and is production ready.

Nominatim AC will be maintained to further investigate the use of search 'profiles' to improve the user experience. ie. selectively excluding things like post boxes and bus stops.

Local development

This is a Spring Boot project with a Gradle build.

Configuration is in the file named application.properties.

Build locally with:

gradle clean build

The tests are expecting to see a Postgres Nominatim 3.3 schema containing a Sep 2019 Great Britain import on localhost port 6432 (which is where nominatim-docker would be).

Installation

The Elasticsearch index is populated by reading from the Postgres database of a locally running Nominatim instance.

Installing a whole world Nominatim instances is a fairly large undertaking. From experience a full world Nominatim instance requires a machine with at least 32GB of RAM available. I struggled to build a consumer machine which could complete a full install. A full install was eventually successful using a HP DL360 server with 32Gb of RAM (single Xeon processor).

The initial Nominatim import of planet.osm took approximately 6 weeks to complete and consumed around 1TB of disk. The indexing the Nominatim postgres database into Elasticsearch takes around 48 hours. The Elasticsearch index is topped up every 5 minutes to capture updates feed into Nominatim via Osmosis (as per Nominatims' install instructions).

Mediagis have published a Nominatim Docker build which can be used for local development (https://github.com/mediagis/nominatim-docker).

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].