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
Hera is a Python framework for constructing and submitting Argo Workflows.

Hera is an Argo Workflows Python SDK. Hera aims to make workflow construction and submission easy and accessible to everyone! Hera abstracts away workflow setup details while still maintaining a cons

argoproj-labs 241 Jan 02, 2023
This is a a CSMA/CA simulator written in Python based on simulator of the same type

This is a a CSMA/CA simulator written in Python based on simulator of the same type found the link https://github.com/StevenSLXie/CSMA-Simulator with

M. Ismail 4 Nov 22, 2022
Курс "Искусственный интеллект и машинное обучение"

Искусственный интеллект и машинное обучение О курсе Данный репозиторий содержит в себе сопроводительный учебный материал для курса "Искусственный инте

Dmitry Aladin 19 Dec 04, 2022
Repls goes to sleep due to inactivity, but to keep it awake, simply host a webserver and ping it.

Repls goes to sleep due to inactivity, but to keep it awake, simply host a webserver and ping it. This repo will help you make a webserver with a bit of console controls.

2 Mar 01, 2022
Open source stenotype engine

Plover Bringing stenography to everyone. Homepage Releases Wiki Blog Google Group Discord Chat About Installation Getting help Contributing Donations

Open Steno Project 2k Jan 09, 2023
A Blender addon for VSE that auto-adjusts video strip's length, if speed effect is applied.

Blender VSE Speed Adjust Addon When using Video Sequence Editor in Blender, the speed effect strip doesn't auto-adjusts clip length when changing its

Arpit Srivastava 2 Jan 18, 2022
Pokemon catch events project to demonstrate data pipeline on AWS

Pokemon Catches Data Pipeline This is a sample project to practice end-to-end data project; Terraform is used to deploy infrastructure; Kafka is the t

Vitor Carra 4 Sep 03, 2021
A discord group chat creator just made it because i saw people selling this stuff for like up to 40 bucks

gccreator some discord group chat tools just made it because i saw people selling this stuff for like up to 40 bucks (im currently working on a faster

baum1810 6 Oct 03, 2022
About Python's multithreading and GIL

About Python's multithreading and GIL

Souvik Ghosh 3 Mar 01, 2022
Install Firefox from Mozilla.org easily, complete with .desktop file creation.

firefox-installer Install Firefox from Mozilla.org easily, complete with .desktop file creation. Dependencies Python 3 Python LXML Debian/Ubuntu: sudo

rany 7 Nov 04, 2022
LOL英雄联盟云顶之弈挂机刷代币脚本,全自动操作,智能逻辑,功能齐全。

LOL云顶之弈挂机刷代币脚本 这是2019年全球总决赛写的一个云顶挂机脚本,python完成的。 功能: 自动拿牌卖牌 策略是高星策略,非固定阵容 自动登陆账号、打码、异常重启 战利品截图上传百度云 web中控发号,改密码,查看信息等 代码是三天赶出来的,所以有点混乱,WEB中控代码也不知道扔哪去了

77 Oct 10, 2022
MeerKAT radio telescope simulation package. Built to simulate multibeam antenna data.

MeerKATgen MeerKAT radio telescope simulation package. Designed with performance in mind and utilizes Just in time compile (JIT) and XLA backed vectro

Peter Ma 6 Jan 23, 2022
Python requirements.txt Guesser

Python-Requirements-Guesser ⚠️ This is alpha quality software. Work in progress Attempt to guess requirements.txt modules versions based on Git histor

Jerome 9 May 24, 2022
Macros in Python: quasiquotes, case classes, LINQ and more!

MacroPy3 1.1.0b2 MacroPy is an implementation of Syntactic Macros in the Python Programming Language. MacroPy provides a mechanism for user-defined fu

Li Haoyi 3.2k Jan 06, 2023
AKSWINPOSTINIT -- AKS Windows node post provisioning initialization

AKSWINPOSTINIT -- AKS Windows node post provisioning initialization Features This is a tool that provides one-time powershell script initilization for

Ping He 3 Nov 25, 2021
Test for using pyIIIFpres for rara magnetica project

raramagnetica_pyIIIFpres Test for using pyIIIFpres for rara magnetica project. This test show how to use pyIIIFpres for creating mannifest compliant t

Giacomo Marchioro 1 Dec 03, 2021
Validate UC alumni identifier numbers with Python 3.

UC number validator Validate UC alumni identifier numbers with Python 3. Getting started Install the library with: pip install -U ucnumber Usage from

Open Source eUC 1 Jul 07, 2021
Anki Addon idea by gbrl.sc to see previous ratings of a card in the reviewer

Card History At A Glance Stop having to press card browser and ctrl+i for every card and then WINCING to see it's history of reviews FEATURES Visualiz

Jerry Zhou 11 Dec 19, 2022
Projeto para ajudar no aprendizado da linguagem Pyhon

Economize Este projeto tem o intuito de criar desáfios para a codificação em Python, fazendo com que haja um maior entendimento da linguagem em seu to

Lucas Cunha Rodrigues 1 Dec 16, 2021
Course materials for a 3-day seminar "Machine Learning and NLP: Advances and Applications" at New College of Florida

Machine Learning and NLP: Advances and Applications This repository hosts the course materials used for a 3-day seminar "Machine Learning and NLP: Adv

Yoshi Suhara 11 Jun 22, 2022