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
Pypot ⚙️ A Python library for Dynamixel motor control

Pypot ⚙️ A Python library for Dynamixel motor control Pypot is a cross-platform Python library making it easy and fast to control custom robots based

Poppy Project 238 Nov 21, 2022
Zotero references script (and app)

A little script (and PyInstaller build) for a very specific, somewhat hack-ish purpose: managing and exporting project references with Zotero and its API.

Marius Rödder 0 Dec 05, 2021
BestBuy Script Designed to purchase any item when it becomes available.

prerequisites: Selnium; undetected-chromedriver. This Script is designed to order an Item provided a link from BestBuy.com only.

Bransen Smith 0 Jan 12, 2022
Interpreting-compiling programming language.

HoneyASM The programming language written on Python, which can be as interpreted as compiled. HoneyASM is easy for use very optimized PL, which can so

TalismanChet 1 Dec 25, 2021
Subnet calculator script using python

subnetCalculator Subnet calculator script using python3 Interactive Version Define the subnet variable interactively Use: subnetDict = subnetCalculato

1 Feb 15, 2022
Hashcrack: Hash Bruteforse tool using python

HashCrack Hash Bruteforse tool Usage hashcrack.py -n 6 -c lower -l 5 -a md5 -t 3

Lev 1 May 04, 2022
Covid-ChatBot - A Rapid Response Virtual Agent for Covid-19 Queries

COVID-19 CHatBot A Rapid Response Virtual Agent for Covid-19 Queries Contents What is ChatBot Types of ChatBots About the Project Dataset Prerequisite

NelakurthiSudheer 2 Jan 04, 2022
OTP-Bomber - An otp from MPL ID app, which can be spammed

OTP-Bomber An otp from MPL ID app, which can be spammed Note: Only available on

5 Oct 29, 2022
RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.

RDFLib RDFLib is a pure Python package for working with RDF. RDFLib contains most things you need to work with RDF, including: parsers and serializers

RDFLib 1.8k Jan 02, 2023
pyForgeCert is a Python equivalent of the original ForgeCert written in C#.

pyForgeCert is a Python equivalent of the original ForgeCert written in C#.

Evi1cg 47 Oct 08, 2022
Tenda D151 & D301 - Unauthenticated configuration download

Exploit Title: Tenda D151 & D301 - Unauthenticated configuration download (login included)

Ayoub 3 Jul 14, 2022
frida-based ceserver. iOS analysis is possible with Cheat Engine.

frida-ceserver frida-based ceserver. iOS analysis is possible with Cheat Engine. Original by Dark Byte. Usage Install frida on iOS. python main.py Cyd

KenjiroIchise 89 Jan 08, 2023
Official repository for the BPF Performance Tools book

BPF Performance Tools This is the official repository of BPF (eBPF) tools from the book BPF Performance Tools: Linux and Application Observability. Th

Brendan Gregg 1.2k Dec 28, 2022
Moleey Panel with python 3

Painel-Moleey pkg upgrade && pkg update pkg install python3 pip install pyfiglet pip install colored pip install requests pip install phonenumbers pkg

Moleey. 1 Oct 17, 2021
A python module for DeSo

DeSo.py A python package for DeSo. Developed by ItsAditya Run pip install deso to install the module! Examples of How To Use DeSo.py Getting $DeSo pri

ItsAditya 0 Jun 30, 2022
This simple script generates a backup of a given Python and R environment

Python Environment Backup It’s always good to maintain your Python and R Anaconda environment packages properly listed and well-kept in case you have

Andrew Laganaro 1 Jul 13, 2022
Repo created for the purpose of adding any kind of programs and projects

Programs and Project Repository A repository for adding programs and projects of any kind starting from beginners level to expert ones Contributing to

Unicorn Dev Community 3 Nov 02, 2022
A brainfuck-based game oriented language written in python.

GF.py STILL WIP Gamefuck.py is a programming language based off brainfuck. It is oriented towards game development, and as such has many commands spec

Xenon 1 Feb 23, 2022
Processamento da Informação - Disciplina UFABC

Processamento da Informacao Disciplina UFABC, Linguagem de Programação Python - 2021.2 Objetivos Apresentar os fundamentos sobre manipulação e tratame

Melissa Junqueira de Barros Lins 1 Jun 12, 2022
Personal Finance Forecaster - An AI tool for forecasting personal expenses

Personal Finance Forecaster - An AI tool for forecasting personal expenses

2 Mar 09, 2022