Giter VIP home page Giter VIP logo

photon's Introduction

photon

Photon is an open source geocoder built for OpenStreetMap data. It is based on elasticsearch - an efficient, powerful and highly scalable search platform.

Photon was started by komoot and provides search-as-you-type and multilingual support. It's used in production with thousands of requests per minute at www.komoot.de.

The current version is still under heavy development, feel free to test and participate. The previous version based on solr is accessible in the deprecated solr branch.

Features

  • high performance
  • highly scalability
  • search-as-you-type
  • multilingual search
  • location bias
  • typo tolerance
  • OSM data import (built upon Nominatim) inclusive continuous updates

Prerequisites

  • Java 6
  • Maven
  • Python 2/3 (currently necessary for API)
  • Nominatim (currently necessary for continuous updates)

Installation

git clone [email protected]:komoot/photon.git
cd photon
mvn clean package

Usage

Import Data

To import worldwide data in four languages (English, German, French and Italian) you can use our preprocessed dataset. You won't be able to continuously update your data to keep them in sync with the latest OSM changes. However you avoid to install and import Nominatim which is time consuming.

Simply start photon

java -jar target/photon-importer-0.1-SNAPSHOT.jar

and load the global dataset by calling

curl http://localhost:4567/dump/import # not working yet!

Be aware that you download several GB of data, the import itself will take only a few minutes.

Import Data (inclusive continuous updates)

If you need continuous updates or want to import country extracts only, you need to install Nominatim by yourself. Once this is done you can start the data importer:

java -jar target/photon-importer-0.1-SNAPSHOT.jar -nominatim-import -host localhost -port 5432 -database nominatim -user nominatim -password ...

The import will take some hours/days, ssd disk are recommended to accelerate nominatim queries.

TODO: missing docu for continuous updates

Start Photon

java -jar target/photon-importer-0.1-SNAPSHOT.jar

Run the Demo UI

The python demo UI is located in website/photon.

It has been developed with python3.4 (but should work with python2.x). We suggest to use virtualenv for the installation.

  • Get the virtualenv system packages:
    sudo apt-get install python-pip python-virtualenv virtualenvwrapper
    
  • Create a virtualenv:
mkvirtualenv -p python3.4 photon
  • Install dependencies:
cd website/photon
pip install -r requirements.txt
  • Run the server
python app.py

Licence

Photon software is open source and licensed under Apache License, Version 2.0

photon's People

Contributors

christophlingg avatar cinemascop89 avatar felixwittmann avatar jonaskmt avatar lilithwittmann avatar lipanski avatar lonvia avatar richterb avatar yohanboniface avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.