The open source software to build cool stuff with locomotion
Clone or download
pbougue Merge pull request #2537 from Tisseo/pr_line_section_tests
tests: rewrite line section tests in order to check all disruptions
Latest commit 2afaa2e Sep 25, 2018

readme.rst

navitia

(pronounce [navi-sia])

build status

Presentation

Welcome to the Navitia repository. Navitia is a service providing:

  1. multi-modal journeys computation
  2. line schedules
  3. next departures
  4. exploration of public transport data
  5. search & autocomplete on places
  6. sexy things such as isochrones

Approach

Navitia is an open-source web API, initially built to provide traveler information on urban transportation networks. Its main purpose is to provide day-to-day informations to travelers. Over time, Navitia has been able to do way more, sometimes for technical and debuging purpose or because other functional needs fit quite well in what Navitia can do or just because it was quite easy and super cool.

Technically, Navitia is a HATEOAS API that returns JSON formated results.

Who's who

Navitia is instanciated and exposed publicly through api.navitia.io. Developments on Navitia are lead by Kisio Digital (previously CanalTP). Kisio Digital is a subsidiary of Keolis (itself a subsidiary of SNCF, French national railway company).

More information

Getting started

Want to test the API ?

The easiest way to do this is a to go to navitia.io. Signup, grab a token, read the doc and start using the API!

For a more friendly interface you can use the API through navitia playground (no matter the server used)

Want to use you own datasets or infrastructure ?

docker

The easiest way to have your own navitia is to use the navitia docker-compose.

fabric

If you don't want to use the prebuilt docker images you can use the fabric scripts we use to deploy to api.navitia.io.

WARNING: Those scripts should be usable, but they are not meant to be completly generics and are designed for our own servers architecture.

Use this only if the docker does not suit your needs and if you are an experienced user 😉

Want to dev in navitia ?

if you want to build navitia, please refer to the installation documentation

You can also check the automated build script which is meant as a step by step tutorial for compiling and using navitia with ubuntu 16.04

Code Organisation

At the root of the repository, several directories can be found:

  1. source: contains the navitia source code (c++ and python)
  2. third_party: third party developped modules
  3. documentation: all the navitia documentation
  4. (debug|release): by convention, the build repositories

Architecture overview

Navitia is made of 3 main modules:

  1. Kraken is the c++ core
  2. Jörmungandr is the python frontend
  3. Ed is the postgres database

Kraken and Jörmungandr communicate with each other through protocol buffer messages send by ZMQ.

Transportation data (in the GTFS format) or routing data (from OpenStreetMap for the moment) can be given to Ed. Ed produces a binary file used by Kraken.

documentation/diagrams/Navitia_simple_architecture.png

More information here: https://github.com/CanalTP/navitia/wiki/Architecture

Tools

  1. Gcc (or clang) as the C++ compiler (g++)
  2. Cmake for the build system
  3. Python for the api

How to contribute

Fork the github repo, create a new branch from dev, and submit your pull request!

Make sure to run the tests before submiting the pull request (make test in the build directory, you may also run make docker_test for important contributions)

Are there many people contributing? Yes: https://www.youtube.com/watch?v=GOLfMTMGVFI

Alternatives?

Navitia is written in python/c++, here are some alternatives: