Giter VIP home page Giter VIP logo

packaging's Introduction

 ██▒   █▓ ▄▄▄       ██▓     ██░ ██  ▄▄▄       ██▓     ██▓    ▄▄▄
▓██░   █▒▒████▄    ▓██▒    ▓██░ ██▒▒████▄    ▓██▒    ▓██▒   ▒████▄
 ▓██  █▒░▒██  ▀█▄  ▒██░    ▒██▀▀██░▒██  ▀█▄  ▒██░    ▒██░   ▒██  ▀█▄
  ▒██ █░░░██▄▄▄▄██ ▒██░    ░▓█ ░██ ░██▄▄▄▄██ ▒██░    ▒██░   ░██▄▄▄▄██
   ▒▀█░   ▓█   ▓██▒░██████▒░▓█▒░██▓ ▓█   ▓██▒░██████▒░██████▒▓█   ▓██▒
   ░ ▐░   ▒▒   ▓▒█░░ ▒░▓  ░ ▒ ░░▒░▒ ▒▒   ▓▒█░░ ▒░▓  ░░ ▒░▓  ░▒▒   ▓▒█░
   ░ ░░    ▒   ▒▒ ░░ ░ ▒  ░ ▒ ░▒░ ░  ▒   ▒▒ ░░ ░ ▒  ░░ ░ ▒  ░ ▒   ▒▒ ░
     ░░    ░   ▒     ░ ░    ░  ░░ ░  ░   ▒     ░ ░     ░ ░    ░   ▒
      ░        ░  ░    ░  ░ ░  ░  ░      ░  ░    ░  ░    ░  ░     ░  ░
     ░

Valhalla is an open source routing engine and accompanying libraries for use with OpenStreetMap data. Valhalla also includes tools like time+distance matrix computation, isochrones, elevation sampling, map matching and tour optimization (Travelling Salesman).

Build Status

Linux/MacOs Windows Code Coverage
Circle CI Windows CI codecov

License

Valhalla, and all of the projects under the Valhalla organization, use the MIT License. Avatar/logo by Jordan.

OpenStreetMap data in the ./test/data is licensed under ODbL and copyrighted by OSM contributors. Additional information on licenses and other requirements concerning the data sources most frequently used by Valhalla can be found in the docs.

Overview

There are several key features that we hope can differentiate the Valhalla project from other routing and network analysis engines. They are:

  • Open source software, on open source data with a very liberal license. Should allow for transparency in development, encourage contribution and community input, and foster use in other projects.
  • Tiled hierarchical data structure. Should allow users to have a small memory footprint on memory constrained devices, enable offline routing, provide a means for regional extracts and partial updates.
  • Dynamic, runtime costing of edges and vertices within the graph via a plugin architecture. Should allow for customization and alternate route generation.
  • C++ based API. Should allow for cross compilation of the various pieces to enable routing on offline portable devices.
  • A plugin based narrative and manoeuvre generation architecture. Should allow for generation that is customized either to the administrative area or to the target locale.
  • Multi-modal and time-based routes. Should allow for mixing auto, pedestrian, bike and public transportation in the same route or setting a time by which one must arrive at a location.

Demo Server

FOSSGIS e.V. hosts a demo server which is open to the public and includes a full planet graph with an open-source web app on https://valhalla.openstreetmap.de. The HTTP API is accessible on a slightly different subdomain, e.g. https://valhalla1.openstreetmap.de/isochrone. Usage of the demo server follows the usual fair-usage policy as OSRM & Nominatim demo servers (somewhat enforced by rate limits).

Platform Compatibility

Valhalla is fully functional on many Linux and Mac OS distributions, and is also used on iOS and Android devices.

For Windows, not all functionality is fully supported yet. Building the Valhalla library works flawlessly, as well as the following application modules:

  • TOOLS: utilities to query and benchmark various components
  • DATA_TOOLS: utilities to build input data and handle transit
  • PYTHON_BINDINGS: use all actions (route, isochrones, matrix etc) via the Valhalla Python library (needs a full (i.e. development) Python distribution in the PATH)

Organization

The Valhalla organization is comprised of several library modules each responsible for a different function. The layout of the various modules is as follows:

  • Midgard - Basic geographic and geometric algorithms for use in the various other projects.
  • Baldr - The base data structures for accessing and caching tiled route data.
  • Sif - Library used in costing of graph nodes and edges. This can be used as input to loki and thor.
  • Skadi - Library and service for accessing elevation data. This can be used as input to mjolnir or as a standalone service.
  • Mjolnir - Tools for turning open data into Valhalla graph tiles.
  • Loki - Library used to search graph tiles and correlate input locations to an entity within a tile. This correlated entity (edge or vertex) can be used as input to thor.
  • Meili - Library used to for map-matching.
  • Thor - Library used to generate a path through the graph tile hierarchy. This path and attribution along the path can be used as input to odin.
  • Odin - Library used to generate manoeuvres and narrative based on a path. This set of directions information can be used as input to tyr.
  • Tyr - Service used to handle http requests for a route communicating with all of the other valhalla APIs. The service will format output from odin and support json (and eventually protocol buffer) output.
  • Tools - A set command line tools that exercise bits of functionality from the library components above and provide the basis for quality testing and performance benchmarking.
  • Demos - A set of demos which allows interacting with the service and APIs.

Documentation

Documentation is stored in the docs/ folder in this GitHub repository. It can be viewed at valhalla.github.io/valhalla.

Installation

To run Valhalla locally or your own server, we recommend using our Docker image. Checkout our docker image here: https://github.com/orgs/valhalla/packages. Also, there's a community Docker image with more "magic" than the native one.

If you want to build Valhalla from source, follow the documentation.

For more information on binaries, see Command Line Tools section below and the docs.

Contributing

We ❤️ contributions to Valhalla. They could be non-technical, e.g. translations into other languages via Transifex or documentation improvements, or technical ones like bug fixes or feature implementations. It's important to open an issue before setting out to work on a PR.

Ideally, get familiar with our Contribution guidelines first.

Benchmarks

Valhalla includes several microbenchmarks which you can build and run using:

make benchmarks
make run-benchmarks

They are enabled by the -DENABLE_BENCHMARKS=On CMake flag and are currently only available for Linux and MacOS.

Command Line Tools

valhalla_service aka one-shot mode

If you can't (e.g. Windows Server) or don't want to have the full-fledged HTTP API running, you can have the (almost) exact same behavior with the 'valhalla_service' executable in so-called "one-shot" mode. It's simple, just pass the config file, the action (route, isochrone, matrix etc) and the stringified JSON request (or alternatively a file containing the request to circumvent shell command length issues):

valhalla_service valhalla.json isochrone '{"locations":[{"lat":42.552448,"lon":1.564865}],"costing":"auto","contours":[{"time":10,"color":"ff0000"}], "show_locations":true}'
# Alternatively you can pass a file with the same contents
valhalla_service valhalla.json isochrone isochrone_request.txt

It's important to note that all Valhalla logs for one-shot mode are piped to stderr while the actual JSON response will be in stdout. To completely silence the logs, pass type: "" to midgard.logging in the config file.

Batch Script Tool

Related projects

The following projects are open-source and built with the intention to make it easier to use Valhalla and its features:

  • OpenStreetMapSpeeds: A project conflating open GPS data to improve Valhalla's speed classification. The current JSON is from early 2022 and can be downloaded here and used by setting the path in the mjolnir.default_speeds_config config option.
  • docker-valhalla: An easy-to-use, relatively magical Docker image for Valhalla, which only requires setting a few environment variables in docker-compose.yml to get a full-featured Valhalla instance.
  • valhalla-operator: A k8s operator to deploy and manage Valhalla.
  • valhalla-app: A React based web app for Valhalla, powering https://valhalla.openstreetmap.de/.
  • valhalla-qgis-plugin: A QGIS plugin for Valhalla, also available in the official QGIS plugin store. Note, it's almost deprecated and will be replaced with a much superior alternative.
  • routingpy: A Python client for most open-source routing engines, including Valhalla, with a common interface for all engines. Available on PyPI.
  • routingjs: A TypeScript client for most open-source routing engines, including Valhalla, with a common interface for all engines. Available as engine-specific packages on npm.
  • pyvalhalla: Python bindings for Valhalla, so its APIs can be used from within Python without a HTTP service. Available on PyPI.
  • Valhalla_jll.jl: Valhalla binaries shipped for Julia.
  • valhalla-go: Valhalla Golang bindings via cgo

packaging's People

Contributors

dgearhart avatar dnesbitt61 avatar gknisely avatar kdiluca avatar kevinkreiser avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

packaging's Issues

Packaging using Cmake

recently valhalla has been moving towards cmake support in valhalla/valhalla#1272

the packaging repository is currently making use of standard autotools to build packages for ubuntu. we dont want to continue to maintain both autotools and cmake as this is just added burden and someone will forget. we need to move toward updating packing to make use of cmake.

googling around suggests at least one thing we need to do is update debian/rules to tell it to use cmake:

dh $@ --buildsystem=cmake

there are bound to be other issues beyond that. it should also be noted that @oxidase has added cmake targets that produce .deb files but they dont conform to the same layout as the ones published on the ubuntu ppas (launchpad).

cc: @TheMarex

publish is broken

for some reason the simplification of the publish script has caused the xenial packages to get rejected. might be something to do with the repackaging of the source for every upload... we get this message:

Rejected:
File libvalhalla1.1.2_1.1.2.orig.tar.gz already exists in valhalla, but uploaded version has different contents. See more information about this error in https://help.launchpad.net/Packaging/UploadErrors.
Files specified in DSC are broken or missing, skipping package unpack verification.

put version in library so name

lintian warns about so name not matching version. this doesnt stop us from publishing it but it would be nice if we would do it anyway. one reason for doing this is to be more clear about what version of the library is linked by what executables. especially because we will be installing versions over top of or first purging previous versions before installing new ones it'd be good to be able to see the version number in the library itself. generally a link will be made anyway without the version in the actual so name so that the generic non version name of the so file will be there pointing to the versioned one.

here might be some info on how to do this: https://autotools.io/libtool/version.html

Can't install Valhalla on Linux Mint 17.3 with UbuntuGIS unstable

Hi folks,

Following the instructions, i tried to install Valhalla on my Linux Mint 17.3 Cinnamon 64-bit machine but errored out with the following messages.

The problem seems to be a spatial library conflict.
For your information, i'm using the UbuntuGIS unstable PPA for Trusty (deb http://ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu trusty main).

~> grep -cF trusty /etc/lsb-release0
0

# Add the PPAs and update
~> sudo add-apt-repository -y ppa:kevinkreiser/prime-server
~> sudo add-apt-repository -y ppa:valhalla-routing/valhalla
~> sudo apt-get update
# All good; output omitted

~> sudo apt-get install -y valhalla-bin
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
valhalla-bin : Depends: libvalhalla0 (= 2.1.9-0ubuntu1~trusty1) but it
is not going to be installed
Depends: libprime-server0.6.3-0 but it is not going to
be installed
Depends: prime-server0.6.3-bin but it is not going to be
installed
E: Unable to correct problems, you have held broken packages.
araichev@wujarch~> sudo aptitude install -y valhalla-bin
The following NEW packages will be installed:
jq{a} libgeos-3.4.2{a} libgeos-c1{a} libprime-server0.6.3-0{ab}
libreadosm1{a} libvalhalla0{a} prime-server0.6.3-bin{a} spatialite-bin{a}
valhalla-bin
0 packages upgraded, 9 newly installed, 0 to remove and 23 not upgraded.
Need to get 2,876 kB/3,329 kB of archives. After unpacking 19.8 MB will
be used.
The following packages have unmet dependencies:
libprime-server0.6.3-0 : Depends: libczmq3 (>= 3.0.2) which is a
virtual package.
Depends: libzmq5 (>= 4.0.1+dfsg) which is a
virtual package.
libgeos-c1v5 : Breaks: libgeos-c1 (< 3.4.2-8~) but 3.4.2-4ubuntu1 is to
be installed.
The following actions will resolve these dependencies:

Keep the following packages at their current version:
1) libgeos-c1 [Not Installed]
2) libprime-server0.6.3-0 [Not Installed]
3) libvalhalla0 [Not Installed]
4) prime-server0.6.3-bin [Not Installed]
5) valhalla-bin [Not Installed]

No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 23 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

32bit builds of valhalla fail

right now lots of the tests fail and there are compiler errors on 32bit machines. this issue is a place holder because we really need to go fix the builds for each repo separately but ultimately this can be a success in that 32bit packages can be put up on launchpad.

have CI build 32bit

either we need to make travis install all the 32bit stuff via:

sudo dpkg --add-architecture i386
sudo apt-get install *:i386

or we do something like vagrant and have a headless 32bit machine started instead of the ci

Unable to install libvalhalla in Xenial

Step 5 : RUN apt-cache search valhalla && apt-get install -y libvalhalla0 libvalhalla-dev
 ---> Running in cc12eaf56bcd
libvalhalla-dev - OpenStreetMap Routing API
libvalhalla0 - OpenStreetMap Routing API
valhalla-bin - OpenStreetMap Routing Executables
valhalla-server - Open Source Routing Engine and Libraries sponsored by Mapzen.
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libvalhalla0 : Depends: libspatialite5 but it is not installable
                Depends: libprotobuf8 but it is not installable
                Depends: libgeos-3.4.2 but it is not installable
                Depends: libgeos-c1 but it is not installable
E: Unable to correct problems, you have held broken packages.
The command '/bin/sh -c apt-cache search valhalla && apt-get install -y libvalhalla0 libvalhalla-dev' returned a non-zero code: 100
make: *** [/home/pt/Sites/mapillary/cluster/build/app/Makefile:47:build] 错误 100

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.