High-level bindings to the Valhalla framework.

Overview

Valhalla for Python

This spin-off project simply offers improved Python bindings to the fantastic Valhalla project.

Installation

pip install valhalla

We package CPython 3.7, 3.8, 3.9 binary wheels for Win64, MacOS X and Linux distributions with glibc>=2.24 (most modern systems, see PEP 600). We do not offer a source distribution on PyPI. Please contact us on [email protected] if you need support building the bindings for your platform.

Build

First you need to build and install valhalla. On Linux I use:

cmake -B build -DENABLE_BENCHMARKS=OFF -DENABLE_PYTHON_BINDINGS=OFF -DENABLE_TESTS=OFF -DENABLE_TOOLS=OFF -DENABLE_SERVICES=OFF -DENABLE_HTTP=OFF -DCMAKE_BUILD_TYPE=Release -G Ninja
cmake --build build -- -j$(nproc)
cmake --build . --target install

This should be enough for all platforms. For OSX and Linux the wheels have to be fixed with auditwheel or delocate.

pip install setuptools wheel setuptools_scm setuptools_scm_git_archive pybind11
python setup.py bdist_wheel

Usage

TBD

Comments
  • Change configuration

    Change configuration

    We can use get_help() to retrieve the config information. Could we change the configuration? For example, I want to increase the number of points allowed in trace.

    opened by vtao1989 2
  • Link protobuf statically

    Link protobuf statically

    WIP

    this will allow the python bindings to link to a static protobuf library which will circumvent problems with the qgis python console. it's a little patchy still, at some point we might want to include tile building and depend on spatialite which will cause the same problem. there's a good chance though that spatialite static is in debian's package manager and is compiled with position-independent-code :crossed_fingers:

    still needs:

    • [x] choose a protobuf tag. probably latest, cmake wasn't introduced until very recently
    • [x] smth is messed up with pre-commit
    • [x] update the manylinux image to have the image built protobuf from source
    • [x] adapt and test windows in qgis (comment: couldn't make static linking of protobuf work on windows, maybe bcs libvalhalla is linking dynamically.. actually it took the protobuf-lite.lib but still the resulting .pyd would, maybe additionally, link to the .dll)
    • [x] adapt and test mac os in qgis 🀞 (didn't actually test it works in qgis, but only built the lib on mac)
    opened by nilsnolde 2
  • fix wheel build for win

    fix wheel build for win

    it appears that mvsc does not copy the dependency .dll's to the python distribution (it does do that with valhalla's cmake). so we need another tool similar to auditwheel & delocate. seems that https://github.com/adang1345/delvewheel is a good option. even cibuildwheel considered using it by default.

    opened by nilsnolde 1
  • release v3.0.0

    release v3.0.0

    new, other PR didn't build anymore for some reason..

    branch to collect all things to be done before releasing v3.0.0:

    • ~~all main OSs are integrated~~
    • improve documentation/tutorials with some binder stuff
    opened by nilsnolde 0
  • release v3.0.0

    release v3.0.0

    branch to collect all things to be done before releasing v3.0.0:

    • ~~all main OSs are integrated~~
    • improve documentation/tutorials with some blender package
    opened by nilsnolde 0
  • Solve CI and publishing on PyPI

    Solve CI and publishing on PyPI

    fixes #2, fixes #3

    finally worked for both linux & windows. eventually the process became:

    • we checked in all needed libraries, including valhalla, for all platforms (mac still missing)
    • so we have to build any binary dependency locally and also update all headers etc. easy for win (simply copy the vcpkg libs & headers), but it's harder for linux of course (script provided), mac we'll see, expected to be easier than linux
    • valhalla is registered as submodule but is solely used locally when we want to update valhalla
    • added __version__ and __valhalla_commit to __init__.py, guess that'll become important
    • releasing scheme will be .., but only after we're out of 0.x
    opened by nilsnolde 0
  • Segment fault

    Segment fault

    Package and system information: pyvalhalla 3.0.3 with python 3.10.6 in the Debian Linux 11.

    My task was to map match several trips to the roads. The issue was that, after trace_route returned a RuntimeError with "Exact route match algorithm failed to find path" when map matching a trip, map matching another trip caused the "Segment fault" error.

    opened by vtao1989 2
  • Try PBF in-/output

    Try PBF in-/output

    For maximum performance & output information we could try protobuf in-/output optionally. Probably quite a bit of work, if we want to do it properly, so I’d first try to benchmark the HTTP service to see if it’s worth it. Also, would be much nicer if all endpoints are protobuf compatible, e.g. matrix/isochrone & expansion are not.

    opened by nilsnolde 0
  • More convenience stuff

    More convenience stuff

    I haaate the location stuff for ValhallaπŸ˜… Coords ALWAYS come as lists in one way or another so let’s at least give some convenience function that accepts a ([lon, lat], **kwargs) and returns a location object.

    opened by nilsnolde 0
  • 3.11 is out

    3.11 is out

    Another year passed, python 3.11 is out, so we should build for that as well. Thankfully it's not updated yet on Arch, but usually is within a few weeks, so let's get it built together with #19.

    opened by nilsnolde 0
  • Error setting

    Error setting

    Hi,

    I am map matching a large number of trips to the roads (more than 1000). I currently use a for-loop strategy to match one trip for each request. The issue is when there is a failed match, pyvalhalla will return an error message and stop the loop. Is there a configuration to avoid pyvalhalla to return the error message?

    Or is there a better way than for loop to map match a large number of trips?

    Thank you so much.

    opened by vtao1989 13
Releases(3.0.3)
  • 3.0.3(Sep 11, 2022)

    What's Changed

    • Link protobuf statically by @nilsnolde in https://github.com/gis-ops/pyvalhalla/pull/14

    Full Changelog: https://github.com/gis-ops/pyvalhalla/compare/3.0.2...3.0.3

    Source code(tar.gz)
    Source code(zip)
  • 3.0.2(Mar 10, 2022)

  • 3.0.1(Mar 10, 2022)

  • 3.0.0(Mar 8, 2022)

Owner
GISβ€Šβ€’β€ŠOPS
We at GISβ€Šβ€’β€ŠOPS are passionate about spatial data and build custom solutions evolving around routing, web-maps & spatial databases.
GISβ€Šβ€’β€ŠOPS
A collection of repositories used to realise various end-to-end high-level synthesis (HLS) flows centering around the CIRCT project.

circt-hls What is this?: A collection of repositories used to realise various end-to-end high-level synthesis (HLS) flows centering around the CIRCT p

null 29 Dec 14, 2022
This is a Saleae Logic custom high level analyzer that allows you to search and mark specific packets.

SaleaePacketParser This is a Saleae Logic custom high level analyzer that allows you to search and mark specific packets. Field "Search For" is used f

null 1 Dec 16, 2021
A C-like hardware description language (HDL) adding high level synthesis(HLS)-like automatic pipelining as a language construct/compiler feature.

β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆ

Julian Kemmerer 391 Jan 1, 2023
A complex language with high level programming and moderate syntax.

zsq a complex language with high level programming and moderate syntax.

an aspirin 6 Jun 25, 2022
A example project's description is a high-level overview of why you’re doing a project.

A example project's description is a high-level overview of why you’re doing a project.

Nikita Matyukhin 12 Mar 23, 2022
pvaPy provides Python bindings for EPICS pvAccess

PvaPy - PvAccess for Python The PvaPy package is a Python API for EPICS7. It supports both PVA and CA providers, all standard EPICS7 types (structures

EPICS Base 25 Dec 5, 2022
Python bindings for the Plex API.

Python-PlexAPI Overview Unofficial Python bindings for the Plex API. Our goal is to match all capabilities of the official Plex Web Client. A few of t

Michael Shepanski 931 Jan 7, 2023
Python bindings for `ign-msgs` and `ign-transport`

Python Ignition This project aims to provide Python bindings for ignition-msgs and ignition-transport. It is a work in progress... C++ and Python libr

Rhys Mainwaring 3 Nov 8, 2022
Python bindings for Basler's VisualApplets TCL script generation

About visualapplets.py The Basler AG company provides a TCL scripting engine to automatize the creation of VisualApplets designs (a former Silicon Sof

JΓΌrgen Hock 2 Dec 7, 2022
A competition for forecasting electricity demand at the country-level using a standard backtesting framework

A competition for forecasting electricity demand at the country-level using a standard backtesting framework

null 5 Jul 12, 2022
EasyBuild is a software build and installation framework that allows you to manage (scientific) software on High Performance Computing (HPC) systems in an efficient way.

EasyBuild is a software build and installation framework that allows you to manage (scientific) software on High Performance Computing (HPC) systems in an efficient way.

EasyBuild community 87 Dec 27, 2022
πŸŒπŸ’‰ Global COVID-19 vaccination data at the regional level.

COVID-19 vaccination data at subnational level. To ensure its officiality, the source data is carefully verified.

sociepy 61 Sep 21, 2022
This is an online course where you can learn and master the skill of low-level performance analysis and tuning.

Performance Ninja Class This is an online course where you can learn to find and fix low-level performance issues, for example CPU cache misses and br

Denis Bakhvalov 1.2k Dec 30, 2022
A Pythonic Data Catalog powered by Ray that brings exabyte-level scalability and fast, ACID-compliant, change-data-capture to your big data workloads.

DeltaCAT DeltaCAT is a Pythonic Data Catalog powered by Ray. Its data storage model allows you to define and manage fast, scalable, ACID-compliant dat

null 45 Oct 15, 2022
Control System Packer is a lightweight, low-level program to transform energy equations into the compact libraries for control systems.

Control System Packer is a lightweight, low-level program to transform energy equations into the compact libraries for control systems. Packer supports Python ?? , C ?? and C++ ?? libraries.

mirnanoukari 31 Sep 15, 2022
A tool to allow New World players to calculate the best place to put their Attribute Points for their build and level

New World Damage Simulator A tool designed to take a characters base stats including armor and weapons, level, and base damage of their items (slash d

Joseph P Langford 31 Nov 1, 2022
Fixes your Microphone Level to one specific value.

MicLeveler Fixes your Microphone Level to one specific value. Intention A friend of mine has the problem that some programs are setting his microphone

Moritz Timpe 2 Oct 14, 2021
HSPyLib is a Python library that will elevate your experience to another level.

HomeSetup Python Library - HSPyLib Your mature python application HSPyLib is a Python library that will elevate your experience to another level. It r

Hugo Saporetti Junior 4 Dec 14, 2022
Automatically re-open threads when they get archived, no matter your boost level!

ThreadPersist Automatically re-open threads when they get archived, no matter your boost level! Installation You will need to install poetry to run th

null 7 Sep 18, 2022