Code Monkey home page Code Monkey logo

brouter's Introduction

BRouter

BRouter is a configurable OSM offline router with elevation awareness, Java + Android. Designed to be multi-modal with a particular emphasis on bicycle and energy-based car routing.

For more infos see http://brouter.de/brouter.

Install Dependencies

This project uses Gradle version 7.6, which supports Java up to version 19. If you have a newer version of Java you'll have to update the Gradle version in /gradle/wrapper/gradle-wrapper.properties.

Ubuntu

Install the javac compiler:

apt-get install default-jdk

Build and Run Server

# build the server
bash ./scripts/build.sh

# update the segment files to the most up-to-date for most of Canada (must have these downloaded to run the server)
bash ./scripts/update_segments.sh

# run the server on Linux
bash ./scripts/run.sh

To run the Brouter HTTP server on another platform, use the helper scripts provided in misc/scripts/standalone.

The API endpoints exposed by this HTTP server are documented in the brouter-server/src/main/java/btools/server/request/ServerHandler.java file.

E.g. HTTP request:

http://localhost:17777/brouter?lonlats=-83.014811,42.323696|-82.999228,42.291768&nogos=&profile=trekking&alternativeidx=0&format=geojson

Build and run using Docker

A Dockerfile is included. Build the docker image using docker build --tag brouter . and start the container with docker run -d -p 17777:17777 --name brouter brouter.

Segments (data) files

Routing data files are organised as 5*5 degree files, with the filename containing the south-west corner of the square, which means:

  • You want to route near West48/North37 -> you need W50_N35.rd5
  • You want to route near East7/North47 -> you need E5_N45.rd5

These data files, called "segments" across BRouter, are generated from OpenStreetMap data and stored in a custom binary format (rd5) for improved efficiency of BRouter routing.

Download them from brouter.de

Segments files from the whole planet are generated weekly at https://brouter.de/brouter/segments4/.

You can download one or more segments files, covering the area of the planet you want to route, into the misc/segments4 directory.

Generate your own segments files

You can also generate the segments files you need directly from a planet dump of OpenStreetMap data (or a GeoFabrik extract).

More documentation of this is available in the misc/readmes/mapcreation.md file.

(Optional) Generate profile variants

This repository holds examples of BRouter profiles for many different transportation modes. Most of these can be easily customized by setting variables in the first global context of the profiles files.

An helper script is available in misc/scripts/generate_profile_variants.sh to help you quickly generate variants based on the default profiles, to create a default set of profiles covering most of the basic use cases.

Have a look at the misc/readmes/profile_developers_guide.txt for an in-depth guide on profiles edition and customization.

Documentation

More documentation is available in the misc/readmes folder.

License

BRouter is released under an MIT License.

brouter's People

Contributors

abrensch avatar afischerdev avatar andrewharvey avatar bagage avatar cpesch avatar erlkoenig90 avatar hersle avatar lpalazzi avatar markshiz avatar matkoniecz avatar midnightcomm avatar mincol avatar mjaschen avatar multimodaal avatar muthenberg avatar nrenner avatar ntruchsess avatar phyks avatar polyscias avatar poussinou avatar poutnikl avatar quaelnix avatar radim-asamm avatar rkflx avatar saraedum avatar thomaswaldmann avatar totorrr avatar vodie avatar wladich avatar zod 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.