pyvalhalla-git 3.5.1.post186__cp311-cp311-macosx_14_0_arm64.whl → 3.5.1.post193__cp311-cp311-macosx_14_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- _valhalla.cpython-311-darwin.so +0 -0
- {pyvalhalla_git-3.5.1.post186.dist-info → pyvalhalla_git-3.5.1.post193.dist-info}/METADATA +25 -3
- {pyvalhalla_git-3.5.1.post186.dist-info → pyvalhalla_git-3.5.1.post193.dist-info}/RECORD +26 -23
- valhalla/.dylibs/libaws-crt-cpp.dylib +0 -0
- valhalla/.dylibs/libgdal.37.3.11.0.dylib +0 -0
- valhalla/.dylibs/libkmlbase.1.3.0.dylib +0 -0
- valhalla/.dylibs/libkmldom.1.3.0.dylib +0 -0
- valhalla/.dylibs/libkmlengine.1.3.0.dylib +0 -0
- valhalla/.dylibs/{libluajit-5.1.2.1.1744318430.dylib → libluajit-5.1.2.1.1748459687.dylib} +0 -0
- valhalla/.dylibs/libnss3.dylib +0 -0
- valhalla/.dylibs/libnssutil3.dylib +0 -0
- valhalla/.dylibs/libprime_server.0.dylib +0 -0
- valhalla/.dylibs/libsmime3.dylib +0 -0
- valhalla/.dylibs/libspatialite.8.dylib +0 -0
- valhalla/.dylibs/libsqlite3.3.50.0.dylib +0 -0
- valhalla/.dylibs/libssl3.dylib +0 -0
- valhalla/__init__.py +4 -1
- valhalla/__main__.py +69 -0
- valhalla/__version__.py +2 -2
- valhalla/_scripts.py +46 -0
- valhalla/_valhalla.cc +81 -0
- valhalla/.dylibs/libsqlite3.3.49.2.dylib +0 -0
- {pyvalhalla_git-3.5.1.post186.dist-info → pyvalhalla_git-3.5.1.post193.dist-info}/WHEEL +0 -0
- {pyvalhalla_git-3.5.1.post186.dist-info → pyvalhalla_git-3.5.1.post193.dist-info}/licenses/AUTHORS +0 -0
- {pyvalhalla_git-3.5.1.post186.dist-info → pyvalhalla_git-3.5.1.post193.dist-info}/licenses/COPYING +0 -0
- {pyvalhalla_git-3.5.1.post186.dist-info → pyvalhalla_git-3.5.1.post193.dist-info}/licenses/LICENSE.md +0 -0
- {pyvalhalla_git-3.5.1.post186.dist-info → pyvalhalla_git-3.5.1.post193.dist-info}/top_level.txt +0 -0
_valhalla.cpython-311-darwin.so
CHANGED
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pyvalhalla-git
|
3
|
-
Version: 3.5.1.
|
3
|
+
Version: 3.5.1.post193
|
4
4
|
Summary: High-level bindings to the Valhalla C++ library
|
5
5
|
Home-page: https://github.com/valhalla/valhalla
|
6
6
|
Author: Nils Nolde
|
@@ -26,7 +26,7 @@ Dynamic: summary
|
|
26
26
|
|
27
27
|
## Valhalla Python bindings
|
28
28
|
|
29
|
-
This
|
29
|
+
This folder contains the Python bindings to [Valhalla routing engine](https://github.com/valhalla/valhalla).
|
30
30
|
|
31
31
|
> [!NOTE]
|
32
32
|
> `pyvalhalla(-git)` packages are currently only published for:
|
@@ -34,6 +34,8 @@ This package contains the Python bindings to [Valhalla routing engine](https://g
|
|
34
34
|
> - `win-amd64`
|
35
35
|
> - `macos-arm64`
|
36
36
|
|
37
|
+
On top of the (very) high-level Python bindings, we package some data-building Valhalla executables to ease the process of graph creation.
|
38
|
+
|
37
39
|
### License
|
38
40
|
|
39
41
|
Due to the dependencies we package, the Python bindings are licensed under GNU Lesser General Public License v2 or later (LGPLv2+).
|
@@ -47,6 +49,8 @@ We distribute all currently maintained CPython versions as **binary wheels** for
|
|
47
49
|
|
48
50
|
### Usage
|
49
51
|
|
52
|
+
#### Bindings
|
53
|
+
|
50
54
|
Find a more extended notebook in `./examples`, e.g. how to [use the actor](./examples/actor_examples.ipynb).
|
51
55
|
|
52
56
|
Before using the Python bindings you need to have access to a routable Valhalla graph. Either install Valhalla from source and built the graph from OSM compatible data or use our [Valhalla docker image](https://github.com/gis-ops/docker-valhalla) for a painless experience, e.g. this will build the routing graph for Andorra in `./custom_files`:
|
@@ -71,6 +75,24 @@ actor = Actor(config)
|
|
71
75
|
route = actor.route({"locations": [...]})
|
72
76
|
```
|
73
77
|
|
78
|
+
#### Valhalla executables
|
79
|
+
|
80
|
+
To access the C++ (native) executables, there are 2 options:
|
81
|
+
- (recommended) execute the module, e.g. `python -m valhalla valhalla_build_tiles -h`
|
82
|
+
- execute the Python wrapper scripts directly, e.g. `valhalla_build_tiles -h`
|
83
|
+
|
84
|
+
> [!NOTE]
|
85
|
+
> For the latter option to work, the Python environment's `bin/` folder has to be in the `$PATH`. Inside virtual environments, that's always the case.
|
86
|
+
|
87
|
+
Executing the scripts directly might also not work properly if there's a system-wide Valhalla installation, unless the Python environment's `bin/` folder has higher priority than system folders in `$PATH`. The module execution uses an explicit Python executable which should be preferred.
|
88
|
+
|
89
|
+
There are also some additional commands we added:
|
90
|
+
- `--help`: print the help for `python -m valhalla` explicitly
|
91
|
+
- `--quiet`: redirect `stdout` of the C++ executables to `/dev/null`; can be added **once** anywhere in the command, will not be forwarded to a C++ executable
|
92
|
+
- `print_bin_path`: simply prints the absolute path to the package-internal `bin/` directory where the C++ executables are; useful if the executables should be accessed directly in some script
|
93
|
+
|
94
|
+
To find out which Valhalla executables are currently included, run `python -m valhalla --help`. We limit the number of executables to control the wheel size. However, we're open to include any other executable if there's a good reason.
|
95
|
+
|
74
96
|
### Building from source
|
75
97
|
|
76
98
|
#### Linux
|
@@ -94,7 +116,7 @@ Once built, start a container to actually build Valhalla using AlmaLinux 8:
|
|
94
116
|
```shell
|
95
117
|
cd valhalla
|
96
118
|
docker run -dt -v $PWD:/valhalla-py --name valhalla-py --workdir /valhalla-py ghcr.io/valhalla/manylinux:2_28_valhalla_python
|
97
|
-
docker exec -t valhalla-py /valhalla-py/src/bindings/python/build_linux.sh build_manylinux 3.
|
119
|
+
docker exec -t valhalla-py /valhalla-py/src/bindings/python/build_linux.sh build_manylinux 3.13
|
98
120
|
```
|
99
121
|
|
100
122
|
This will also build & install `libvalhalla` before building the bindings. At this point there should be a `wheelhouse` folder with the fixed python wheel, ready to be installed or distributed to arbitrary python 3.12 installations.
|
@@ -1,17 +1,20 @@
|
|
1
|
-
_valhalla.cpython-311-darwin.so,sha256=
|
2
|
-
pyvalhalla_git-3.5.1.
|
3
|
-
pyvalhalla_git-3.5.1.
|
4
|
-
pyvalhalla_git-3.5.1.
|
5
|
-
pyvalhalla_git-3.5.1.
|
6
|
-
pyvalhalla_git-3.5.1.
|
7
|
-
pyvalhalla_git-3.5.1.
|
8
|
-
pyvalhalla_git-3.5.1.
|
1
|
+
_valhalla.cpython-311-darwin.so,sha256=G6uefdkhtibfTw88P2RrKWv43FJGjBK6bToQRSvnTWA,11478848
|
2
|
+
pyvalhalla_git-3.5.1.post193.dist-info/RECORD,,
|
3
|
+
pyvalhalla_git-3.5.1.post193.dist-info/WHEEL,sha256=IDSs5FX6_bA_Je6GNgVyz6rcn2XC7t_ySnnLoSan-5o,136
|
4
|
+
pyvalhalla_git-3.5.1.post193.dist-info/top_level.txt,sha256=mU472JpF5fOfpVQ8UxZ_dwLmecLogajAMO5RmYsU1gw,19
|
5
|
+
pyvalhalla_git-3.5.1.post193.dist-info/METADATA,sha256=yE_nUq5JEu1Gdl7hI9obCXKTop4bRF0UoIMwrtDaK7U,6335
|
6
|
+
pyvalhalla_git-3.5.1.post193.dist-info/licenses/LICENSE.md,sha256=sZlxfQFAuJ8ba_1E8G3hYQ7eC770tBIywEWAg3rrixM,44
|
7
|
+
pyvalhalla_git-3.5.1.post193.dist-info/licenses/AUTHORS,sha256=IGm6Dg1NRkmFHV2GWvlPdfiqVoc1kfoc0pMbcKiCs30,171
|
8
|
+
pyvalhalla_git-3.5.1.post193.dist-info/licenses/COPYING,sha256=i9sUrrsAX_p17jiQqhCyQrMMhAyqAbmWxWM4yiefN80,1135
|
9
9
|
valhalla/config.py,sha256=kpYm-7RS4Mz3plcfGWNDx1s6tfXjnBGMei1uxhQ7VJM,1488
|
10
|
-
valhalla/
|
11
|
-
valhalla/
|
10
|
+
valhalla/_valhalla.cc,sha256=3OorCxyOun1-Q9olHlHw75q3XlprX4Lgd4UKQSHahsY,3699
|
11
|
+
valhalla/__init__.py,sha256=hkaH-hN0yQ4NLDcAD-d5Jm1Qne6rc7HcDJimDZ92-B8,269
|
12
|
+
valhalla/__version__.py,sha256=Ayqd5H42DgZ_KBT7ApCl3-fCyWjKpNYrTUjrUdD0Qz4,530
|
12
13
|
valhalla/utils.py,sha256=VCxJ5rNX4Ha8Ey4T81y1b3Ke2svUwGn5TNyW8nC_8p8,1923
|
13
14
|
valhalla/actor.py,sha256=MviJjb6ui1KwIzJbACHncuLNDdHkj1hyzCHlDD_yEjw,4077
|
15
|
+
valhalla/_scripts.py,sha256=-zpCo07ckNy9yQFs2BymmmYwKS94ZAhlRyHLPUsfEKg,1504
|
14
16
|
valhalla/valhalla_build_config.py,sha256=WJJG6t6I8NnkGc_Wd4vSwI2mgZcwQqPrwvKph2AjfGc,42507
|
17
|
+
valhalla/__main__.py,sha256=X6B0ffW0-hWWJ-ZowzWnK9tFCF1himT3eQkTWyJ_xL0,2273
|
15
18
|
valhalla/.dylibs/libsnappy.1.2.2.dylib,sha256=1D_MdNjNSmrGYQG30ZlmqXb2H1xTbacCevELbUEtRk0,79184
|
16
19
|
valhalla/.dylibs/libhwy.1.2.0.dylib,sha256=Yrg_gB_yAOrT3Y494y1ePdkxz4-uSWDcin5WVWEmba4,96928
|
17
20
|
valhalla/.dylibs/libIlmThread-3_3.32.3.3.3.dylib,sha256=Cbc2qNJa6hSvnHc_LWttt6wsd3ZgyI6CoCEd3yUlkXs,69744
|
@@ -37,13 +40,13 @@ valhalla/.dylibs/libodbcinst.2.dylib,sha256=ojdBzS-LKx2NFNU-6Igh2OPRTs5XjMTVRk4b
|
|
37
40
|
valhalla/.dylibs/libcom_err.3.0.dylib,sha256=j9RHAQA4fjOq7X76qcJn9cBjp4D-g1JHwP5443B4IB4,71104
|
38
41
|
valhalla/.dylibs/libabsl_time_zone.2407.0.0.dylib,sha256=-eXub4yDlTAmFiN3NuOs82ZAUYCMudJ9F427zfSAPWM,164752
|
39
42
|
valhalla/.dylibs/libprotobuf-lite.29.3.0.dylib,sha256=3e2AhLItC8PCJZ7XqSw-DDosEc5sB2U3OWnntagFsmg,653232
|
40
|
-
valhalla/.dylibs/libspatialite.8.dylib,sha256=
|
43
|
+
valhalla/.dylibs/libspatialite.8.dylib,sha256=beLpS0M1Y60E2owRzaPnE7tZcC2VAppwUBpTctMSx9c,7282384
|
41
44
|
valhalla/.dylibs/libaws-c-common.1.0.0.dylib,sha256=4AjFBLKvWXHbl9_IyeSezeKzv4ZhemWhva7Ium8pAxs,291664
|
42
45
|
valhalla/.dylibs/libabsl_random_internal_platform.2407.0.0.dylib,sha256=0nrMu5IgPIbe08Ynsz_nTWJPTcprVajShNAD0q9MvX4,35136
|
43
46
|
valhalla/.dylibs/librttopo.1.dylib,sha256=rSxptDKe24UQ3T6arfqdI6ergAZn2BqMJAXmAxwgYIg,408256
|
44
47
|
valhalla/.dylibs/libOpenEXRUtil-3_3.32.3.3.3.dylib,sha256=anrBioOSsoPGSwCoY2Hm-bKyCTOHh2B5FeqrgGZ-aAc,226704
|
45
48
|
valhalla/.dylibs/libabsl_decode_rust_punycode.2407.0.0.dylib,sha256=1XB62QL8ehlozvz5aMjcsNJZRd6kbHeMu5ocafh1oVA,52016
|
46
|
-
valhalla/.dylibs/libkmldom.1.3.0.dylib,sha256=
|
49
|
+
valhalla/.dylibs/libkmldom.1.3.0.dylib,sha256=CwYTfDvqsLx7yBMJrwjlIZu5FHKCAe4KoCSi1BdMKO0,544544
|
47
50
|
valhalla/.dylibs/libabsl_log_internal_conditions.2407.0.0.dylib,sha256=1to5Iv9wsYmB0ypRC7NnF6Yc-4NqWE2HSwGmCV0E2FY,52224
|
48
51
|
valhalla/.dylibs/libabsl_random_seed_sequences.2407.0.0.dylib,sha256=KSwJ1YVwM5ZyL4BrZcTEw8-omsbxW5lMRpo9Ua4RhfA,70064
|
49
52
|
valhalla/.dylibs/libgeos.3.13.1.dylib,sha256=7n-wMLqOgD_5IAVIFLgRY4ZVujYo7aIqQTGON_kK_ds,2892720
|
@@ -52,7 +55,7 @@ valhalla/.dylibs/libjxl_cms.0.11.1.dylib,sha256=PvnuHhauhGSKjWH7U7ADaMU2_vVwEH0g
|
|
52
55
|
valhalla/.dylibs/libabsl_flags_commandlineflag.2407.0.0.dylib,sha256=z7Xt5bPmR7Des_goN87EteLCIvmaTKw_6ylBXyJFyQc,68864
|
53
56
|
valhalla/.dylibs/libabsl_random_distributions.2407.0.0.dylib,sha256=B3jjqnPAJ4fRRNGTP3EZn5KW-rzMs7r_N6QhMBwr2E0,70096
|
54
57
|
valhalla/.dylibs/libczmq.4.dylib,sha256=kzBHAUAW53X-JB241N9RJw0LfZH0HRfdK4q7sxKM5Bo,558576
|
55
|
-
valhalla/.dylibs/libaws-crt-cpp.dylib,sha256=
|
58
|
+
valhalla/.dylibs/libaws-crt-cpp.dylib,sha256=vLFpiHkswITRBeD-oBX9e0i_kKJ2G_TcT2kw2pAJVxU,754112
|
56
59
|
valhalla/.dylibs/liblz4.1.10.0.dylib,sha256=kTcBPZ3_-j-qwnREacTtLmapjNnZ-0xq9SeFcK_4Ic4,176960
|
57
60
|
valhalla/.dylibs/liburiparser.1.0.31.dylib,sha256=Bfg4JjnDbHarAalKCjwHNbSTLQNAHoR1Y03yPPJmqLU,127680
|
58
61
|
valhalla/.dylibs/libabsl_flags_private_handle_accessor.2407.0.0.dylib,sha256=lCU_SDCmo2efV6SkJ42zi6B_-4RpS5VcHOWZjLyjAIo,52880
|
@@ -86,7 +89,7 @@ valhalla/.dylibs/libssl.3.dylib,sha256=XbtHxY-Fp8FxFknYWDnlyKjSTUI44tPzH07xVDIzF
|
|
86
89
|
valhalla/.dylibs/libabsl_log_internal_format.2407.0.0.dylib,sha256=1KEcZ4z8p2nlMUztcWAaZMEpQC1VDa3-Phv9cixj4Js,72112
|
87
90
|
valhalla/.dylibs/libabsl_log_sink.2407.0.0.dylib,sha256=wmmSP56bkIXGQSKmKvqhXgp19sXigY12wt8boXNwxSU,68624
|
88
91
|
valhalla/.dylibs/libarrow_dataset.2000.0.0.dylib,sha256=dIUWH4uFDQA5lC5-TLx_UyE6oF2HYWWV3hH9FVJ82dM,2432768
|
89
|
-
valhalla/.dylibs/libprime_server.0.dylib,sha256=
|
92
|
+
valhalla/.dylibs/libprime_server.0.dylib,sha256=h_ScEhTzdwdHHS5UCpDq60I9j423In1XM84PM_MwIjY,393168
|
90
93
|
valhalla/.dylibs/libabsl_strerror.2407.0.0.dylib,sha256=p_NTirDupMktySlY_NFWEw-9vf3Q_mnDwvD2zO2uugI,53872
|
91
94
|
valhalla/.dylibs/libnetcdf.22.dylib,sha256=B2gbziNwPMxNBjwrhgkAwpJeo76uXpxSGzHSWE9h1zc,1309456
|
92
95
|
valhalla/.dylibs/libabsl_time.2407.0.0.dylib,sha256=4jzEGP5uO8FeGeMnPpxPiX2oDl_eiknqIDWaB93ENDU,111456
|
@@ -106,8 +109,8 @@ valhalla/.dylibs/libproj.25.9.6.0.dylib,sha256=ZCPxoJlqpdIKKYb7E9S4y8No6RjnEEhG7
|
|
106
109
|
valhalla/.dylibs/libabsl_raw_logging_internal.2407.0.0.dylib,sha256=LLgu98w-324prrVK10j3FsOzYJDsOlJBAkjENugdTjY,70816
|
107
110
|
valhalla/.dylibs/libgpgme.11.dylib,sha256=CEtXjEOyMgntUSPSpkG8dRsvNp60mpW0BP4V083h0yU,348384
|
108
111
|
valhalla/.dylibs/libabsl_crc32c.2407.0.0.dylib,sha256=PFufLEkmo7d0bZIm1yt9rXcpdvwi_wAl-AijDumWItU,92272
|
109
|
-
valhalla/.dylibs/libkmlbase.1.3.0.dylib,sha256=
|
110
|
-
valhalla/.dylibs/libsmime3.dylib,sha256=
|
112
|
+
valhalla/.dylibs/libkmlbase.1.3.0.dylib,sha256=Qr4dJYXZM--T7IQ5fZoYREV_JtP5HnCWMKEjNnHDJbk,166752
|
113
|
+
valhalla/.dylibs/libsmime3.dylib,sha256=87Ktg9KgH5ogISkAJf9NE7uWVUlCqBbvzmXABulukgk,219920
|
111
114
|
valhalla/.dylibs/libblosc.1.21.6.dylib,sha256=pxnvs--ddsLT4lC3BFmgeiwjL6zZAeYikLJ_vRxVPp8,711168
|
112
115
|
valhalla/.dylibs/libgif.7.2.0.dylib,sha256=A5xhTPnXl-fF4bQ5ksIECjEstlAk6p_9Dv67yXiUbcU,72816
|
113
116
|
valhalla/.dylibs/libaws-checksums.1.0.0.dylib,sha256=QAsW89Ix2A8pR4g6GET6qldgj1dQjK_kysHL-dB3Dvk,119200
|
@@ -134,7 +137,6 @@ valhalla/.dylibs/libabsl_random_internal_randen.2407.0.0.dylib,sha256=389bsaBTlH
|
|
134
137
|
valhalla/.dylibs/libabsl_strings_internal.2407.0.0.dylib,sha256=VIS3roTD2Ktg-w2A59NQJmDeePGjqsSloe6EgeUNDEw,56912
|
135
138
|
valhalla/.dylibs/libabsl_log_internal_message.2407.0.0.dylib,sha256=wNCBhDl2G0M9lL0Moz5X4BEG1edXBAppoFYb9dfyztA,127264
|
136
139
|
valhalla/.dylibs/libabsl_str_format_internal.2407.0.0.dylib,sha256=Z0xy_NsL04mgE6lMru69Vdh5FaLn6XISJjji82Lv4ZU,140160
|
137
|
-
valhalla/.dylibs/libsqlite3.3.49.2.dylib,sha256=M6w2ZzUaXHIn-f8WJp7nTXsqmmRBxtpCspc89MDCtV0,1240880
|
138
140
|
valhalla/.dylibs/libexpat.1.10.2.dylib,sha256=gICKKxEExotTSwMvRxeOFrv0Ww9pNYjgQUWnG3fUGcI,167248
|
139
141
|
valhalla/.dylibs/libabsl_strings.2407.0.0.dylib,sha256=yACdJjQQqjy1Mnf0q0SQHk34Z2q8pBI-Sl7_56NaxtQ,154128
|
140
142
|
valhalla/.dylibs/libabsl_log_internal_nullguard.2407.0.0.dylib,sha256=fohoSzbN6IWNIu8mE8zxamyNMdG4cQIjsOBwqTqZGUQ,35200
|
@@ -143,13 +145,14 @@ valhalla/.dylibs/libutf8_validity.dylib,sha256=yl9wImeibCDiqUpSgQ9OxOQ3sTBfkD2vm
|
|
143
145
|
valhalla/.dylibs/libabsl_malloc_internal.2407.0.0.dylib,sha256=kPNixRU-lTta8lsGjK3eY35FgEIy7iHcXCjY7mXhHVg,56848
|
144
146
|
valhalla/.dylibs/libabsl_flags_marshalling.2407.0.0.dylib,sha256=13nvhdwqZmZAezuryYmq0LKmAF2LDvVMxfJ7w01s7H0,88416
|
145
147
|
valhalla/.dylibs/libabsl_symbolize.2407.0.0.dylib,sha256=WAUWxmJCIx2R4eOEmHEnHG1iOCkps8i0L6ssOppaAjs,70304
|
148
|
+
valhalla/.dylibs/libsqlite3.3.50.0.dylib,sha256=EJQEIAnU-7D3NdV-HD_x4Y5iryw1U0m_GaRewHXIHlI,1241152
|
146
149
|
valhalla/.dylibs/libabsl_cordz_functions.2407.0.0.dylib,sha256=GUIypwx0OBC0nzLkL7VAynZ8hbyccyJRw_BCC_Sx5I8,51744
|
147
150
|
valhalla/.dylibs/libarrow.2000.0.0.dylib,sha256=SntSm_VDy_c8qMCLBOUv29ExXQtMzOtf17sW8cVwvLk,25388256
|
148
|
-
valhalla/.dylibs/libssl3.dylib,sha256=
|
151
|
+
valhalla/.dylibs/libssl3.dylib,sha256=YGGbdTQH67awKo8ShOFLQA-0isuxSaD2Gg15mWnzNo8,383648
|
149
152
|
valhalla/.dylibs/libabsl_bad_variant_access.2407.0.0.dylib,sha256=6LDDEBn-T27Qe0TCOuMi8G5UYbjbPjbxXmTcXaz2kqA,35056
|
150
153
|
valhalla/.dylibs/libImath-3_1.29.11.0.dylib,sha256=Z1460VjZmA3BeqrG4k5XHvpIC92AnyERcmw_XIrrtOE,357824
|
151
154
|
valhalla/.dylibs/libkrb5.3.3.dylib,sha256=HrDFydzihrrMq8H7EftoK8pSk2rcogle8JSEgNoSi1s,791520
|
152
|
-
valhalla/.dylibs/libkmlengine.1.3.0.dylib,sha256=
|
155
|
+
valhalla/.dylibs/libkmlengine.1.3.0.dylib,sha256=Pd7uhEslhQRysNYHoBKIepStgUkW4xHn7-ouKL3IRt8,230736
|
153
156
|
valhalla/.dylibs/libsharpyuv.0.1.1.dylib,sha256=tP0cj6tzdlEvUN761sTEIhj40hN-FMfwUsZf57W7IRA,69872
|
154
157
|
valhalla/.dylibs/libabsl_graphcycles_internal.2407.0.0.dylib,sha256=9tUFtAzRrBkdAv2ZRjgQL43mdsIGuxIWyVijdXfE0FA,73968
|
155
158
|
valhalla/.dylibs/libre2.11.0.0.dylib,sha256=lju4ZHBQ1Nrspjnm7sY_kT21FXOdXSku4MnvWSQuCmU,546608
|
@@ -182,6 +185,7 @@ valhalla/.dylibs/libabsl_log_entry.2407.0.0.dylib,sha256=s9KoClNT2PuqU_h7sebelqc
|
|
182
185
|
valhalla/.dylibs/libabsl_crc_internal.2407.0.0.dylib,sha256=I9JTmdYui8VdPufKXhJgzuIQ1H3MpxcxHvhRBUNF0eg,130704
|
183
186
|
valhalla/.dylibs/libbrotlienc.1.1.0.dylib,sha256=Fwb0M-aX67G8G0EuuOZRfRDuAHrEe4JF8w_buGeyrr0,623552
|
184
187
|
valhalla/.dylibs/libabsl_city.2407.0.0.dylib,sha256=829JJ33BdkBaE2PAkC5J8xG27hjXg4MSTkdi2mwieNI,35328
|
188
|
+
valhalla/.dylibs/libluajit-5.1.2.1.1748459687.dylib,sha256=FTbbIqu70b-qRbFCALwnDM2DvxviixFp295yUlHec1A,544832
|
185
189
|
valhalla/.dylibs/libparquet.2000.0.0.dylib,sha256=sHbCSkHr2lWggUV9cny65GAWNH06Yv4Mje7Rs7WBiVA,3544336
|
186
190
|
valhalla/.dylibs/libabsl_crc_cord_state.2407.0.0.dylib,sha256=FSDkyuNBDMhZYLTV7tTY0lkQiUnReVhAbnS1AuwSWY4,74720
|
187
191
|
valhalla/.dylibs/libk5crypto.3.1.dylib,sha256=DULNjaEXgUFMMLG_PNQTPTydp6cY5eHigTjsepJXarQ,197616
|
@@ -195,11 +199,11 @@ valhalla/.dylibs/libb2.1.dylib,sha256=wwmxJIEnwlg5TRM5c7h9d8xOUhF55Pqu91xQeDiMrr
|
|
195
199
|
valhalla/.dylibs/libabsl_cord.2407.0.0.dylib,sha256=NShy60FKMp3MHtCY2YxDSja0oi0p0igwj8TirSNGogc,162800
|
196
200
|
valhalla/.dylibs/libaws-c-compression.1.0.0.dylib,sha256=YO6pOrvPedyUiA7mxggAiKUDwcc9nsjcDFxYqukOpQ0,70112
|
197
201
|
valhalla/.dylibs/libopenjp2.2.5.3.dylib,sha256=S1xsR6a9lalCw9h4GuEKYLjGECHRHK3hYzp_UcrnJps,325968
|
198
|
-
valhalla/.dylibs/libnssutil3.dylib,sha256=
|
199
|
-
valhalla/.dylibs/libgdal.37.3.11.0.dylib,sha256=
|
202
|
+
valhalla/.dylibs/libnssutil3.dylib,sha256=dvkRF38TppLNG3KWIsInIVfMfMqbVX2-aIhHVvEaZ10,223120
|
203
|
+
valhalla/.dylibs/libgdal.37.3.11.0.dylib,sha256=tTv7DyPOkIQJ5G2hw8VvOl6KkE7v7zRtbwoS7gWqREQ,23847104
|
200
204
|
valhalla/.dylibs/libabsl_base.2407.0.0.dylib,sha256=RaaKM2LJF_7lQQT_WScLOfnwDscWE6FPadQMnz_7iSI,74448
|
201
205
|
valhalla/.dylibs/libabsl_vlog_config_internal.2407.0.0.dylib,sha256=svUIxoI6gPGS2U5JSfAJ2lVe7VyMUAVI9YrRDzC8QtI,95296
|
202
|
-
valhalla/.dylibs/libnss3.dylib,sha256=
|
206
|
+
valhalla/.dylibs/libnss3.dylib,sha256=32iCXZ7ZOROeAtV1YwQdhP1d4hIpMgr-BofPpUE9_SY,1180048
|
203
207
|
valhalla/.dylibs/libtiff.6.dylib,sha256=j_qDL-lqSKZtwcJJewDZitwoOvWyqndDfvJoalvkHtI,526512
|
204
208
|
valhalla/.dylibs/libzstd.1.5.7.dylib,sha256=vmnK_6voSbVHNZxfOBNSs_nnoIYTxsBRcvM8xtOFGsY,670240
|
205
209
|
valhalla/.dylibs/libaws-c-event-stream.1.0.0.dylib,sha256=WJ23clSZh5RkgK4nyurZTiXjxbVnkXjmK7f7REqk82U,134448
|
@@ -208,6 +212,5 @@ valhalla/.dylibs/libabsl_random_internal_pool_urbg.2407.0.0.dylib,sha256=BwN9C3N
|
|
208
212
|
valhalla/.dylibs/libfreexl.1.dylib,sha256=rSFQ5_1mwGEtKUCVjBRlNPKR8aBc8qjOw1m81pXKJtM,106160
|
209
213
|
valhalla/.dylibs/libgeotiff.5.dylib,sha256=4Ho3GFLCMr6PnifceZPJ7eVjC79oBaU3IS9iyZ_F-uQ,195456
|
210
214
|
valhalla/.dylibs/libabsl_log_internal_check_op.2407.0.0.dylib,sha256=BNckrUSPq6ldE5VfZ8ryB91ZZgaakLMEk7Nm9aOOAd4,113872
|
211
|
-
valhalla/.dylibs/libluajit-5.1.2.1.1744318430.dylib,sha256=B5Zub7TuhvqJTLcRt3d5z2m9xOkaNTTeqazfRUFFKS4,544832
|
212
215
|
valhalla/.dylibs/libabsl_cord_internal.2407.0.0.dylib,sha256=dsxQsWyv8FrcH3LusABslihzUNFiR1oULZDn8Ku_zD4,101648
|
213
216
|
valhalla/.dylibs/libaom.3.12.1.dylib,sha256=eS5adGQZEgifzAyG9gWvzqXyh4MVL-wRO4rIdkTZ2Xg,3905040
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
valhalla/.dylibs/libnss3.dylib
CHANGED
Binary file
|
Binary file
|
Binary file
|
valhalla/.dylibs/libsmime3.dylib
CHANGED
Binary file
|
Binary file
|
Binary file
|
valhalla/.dylibs/libssl3.dylib
CHANGED
Binary file
|
valhalla/__init__.py
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
+
from pathlib import Path
|
2
|
+
|
1
3
|
try:
|
2
4
|
from ._valhalla import *
|
3
5
|
except ModuleNotFoundError:
|
4
6
|
from _valhalla import *
|
5
|
-
|
6
7
|
from .actor import Actor
|
7
8
|
from .config import get_config, get_help
|
8
9
|
from .__version__ import __version__
|
10
|
+
|
11
|
+
PYVALHALLA_DIR = Path(__file__).parent.resolve()
|
valhalla/__main__.py
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
import subprocess
|
2
|
+
import sys
|
3
|
+
from typing import Optional
|
4
|
+
|
5
|
+
from ._scripts import PYVALHALLA_BIN_DIR, run
|
6
|
+
|
7
|
+
PRINT_BIN_PATH = "print_bin_path"
|
8
|
+
|
9
|
+
|
10
|
+
def print_help():
|
11
|
+
print(
|
12
|
+
"\npyvalhalla package provides a CLI to run Valhalla C++ executables. Arguments are simply passed on as they are."
|
13
|
+
)
|
14
|
+
print(
|
15
|
+
"One notable exception is --quiet/-q, which will forward the C++ executable's stdout to /dev/null."
|
16
|
+
)
|
17
|
+
print("'python -m valhalla --help' will print this help.")
|
18
|
+
print(
|
19
|
+
"\nExample usage: 'python -m valhalla --quiet valhalla_build_tiles -c valhalla.json -s initialize -e build test.pbf'"
|
20
|
+
)
|
21
|
+
print("\nAvailable commands:")
|
22
|
+
# left-align executable names
|
23
|
+
exe_names = [p.name for p in PYVALHALLA_BIN_DIR.iterdir()]
|
24
|
+
fixed_width = len(max(exe_names, key=lambda x: len(x)))
|
25
|
+
print(
|
26
|
+
f"\t{PRINT_BIN_PATH:<{fixed_width}} - Print the absolute path of directory containing the C++ executables"
|
27
|
+
)
|
28
|
+
for command in exe_names:
|
29
|
+
print(f"\t{command:<{fixed_width}} - see usage with 'python -m pyvalhalla {command} --help' ")
|
30
|
+
|
31
|
+
|
32
|
+
def main():
|
33
|
+
if len(sys.argv) < 2:
|
34
|
+
print("[FATAL] command needs arguments, see 'python -m valhalla --help': \n")
|
35
|
+
print_help()
|
36
|
+
sys.exit(1)
|
37
|
+
|
38
|
+
prog_or_opt = sys.argv[1]
|
39
|
+
|
40
|
+
if prog_or_opt in ("--help", "-h"):
|
41
|
+
print_help()
|
42
|
+
sys.exit(0)
|
43
|
+
elif prog_or_opt == PRINT_BIN_PATH:
|
44
|
+
# useful when another script wants to run the executables directly for some reason
|
45
|
+
# in theory one doesn't even need a python installation for the Valhalla executables
|
46
|
+
# to still work, provided the correct wheel is used for the specific platform
|
47
|
+
print(PYVALHALLA_BIN_DIR)
|
48
|
+
else:
|
49
|
+
exc: Optional[Exception] = None
|
50
|
+
try:
|
51
|
+
run(from_main=True)
|
52
|
+
except (FileNotFoundError, subprocess.CalledProcessError) as e:
|
53
|
+
exc = e
|
54
|
+
finally:
|
55
|
+
if not exc:
|
56
|
+
sys.exit(0)
|
57
|
+
|
58
|
+
if isinstance(exc, subprocess.CalledProcessError):
|
59
|
+
print(f"Failed calling command '{exc.cmd}'\n")
|
60
|
+
|
61
|
+
print_help()
|
62
|
+
print("Sub-command failed with:\n")
|
63
|
+
print(exc, file=sys.stderr)
|
64
|
+
|
65
|
+
sys.exit(1)
|
66
|
+
|
67
|
+
|
68
|
+
if __name__ == "__main__":
|
69
|
+
main()
|
valhalla/__version__.py
CHANGED
@@ -17,5 +17,5 @@ __version__: str
|
|
17
17
|
__version_tuple__: VERSION_TUPLE
|
18
18
|
version_tuple: VERSION_TUPLE
|
19
19
|
|
20
|
-
__version__ = version = '3.5.1.
|
21
|
-
__version_tuple__ = version_tuple = (3, 5, 1, '
|
20
|
+
__version__ = version = '3.5.1.post193'
|
21
|
+
__version_tuple__ = version_tuple = (3, 5, 1, 'post193')
|
valhalla/_scripts.py
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
from pathlib import Path
|
2
|
+
from shutil import which
|
3
|
+
import subprocess
|
4
|
+
import sys
|
5
|
+
|
6
|
+
from . import PYVALHALLA_DIR
|
7
|
+
|
8
|
+
PYVALHALLA_BIN_DIR = PYVALHALLA_DIR.joinpath("bin").resolve()
|
9
|
+
|
10
|
+
|
11
|
+
def run(from_main=False) -> None:
|
12
|
+
"""
|
13
|
+
Parses the command line arguments and runs the Valhalla executables with the
|
14
|
+
provided arguments. Note, by default we assume this is not being called by
|
15
|
+
__main__.py via e.g. 'python -m valhalla ...', but directly with e.g.d
|
16
|
+
'valhalla_build_tiles -h'. sys.argv relates to different executables for
|
17
|
+
both scenarios.
|
18
|
+
|
19
|
+
:param from_main: We parse sys.argv differently if it's called from __main__.py
|
20
|
+
"""
|
21
|
+
prog = sys.argv[1] if from_main else Path(sys.argv[0]).name
|
22
|
+
prog_args = sys.argv[2:] if from_main else sys.argv[1:]
|
23
|
+
|
24
|
+
if not which(prog):
|
25
|
+
raise FileNotFoundError(f"Can't find executable at {prog}")
|
26
|
+
prog_path = PYVALHALLA_BIN_DIR.joinpath(prog).resolve()
|
27
|
+
|
28
|
+
print(f"[INFO] Running {prog_path} with args: {prog_args}...")
|
29
|
+
|
30
|
+
# --quiet/-q is our option, don't pass it to the executables
|
31
|
+
is_quiet = False
|
32
|
+
for arg in prog_args:
|
33
|
+
if arg not in ("--quiet", "-q"):
|
34
|
+
continue
|
35
|
+
prog_args.pop(prog_args.index(arg))
|
36
|
+
is_quiet = True
|
37
|
+
|
38
|
+
# recommended way to call exe
|
39
|
+
proc = subprocess.run(
|
40
|
+
[str(prog_path)] + prog_args,
|
41
|
+
stderr=sys.stderr,
|
42
|
+
stdout=subprocess.DEVNULL if is_quiet else sys.stdout,
|
43
|
+
)
|
44
|
+
|
45
|
+
# raises CalledProcessError if not successful
|
46
|
+
proc.check_returncode()
|
valhalla/_valhalla.cc
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
#include "baldr/rapidjson_utils.h"
|
2
|
+
#include "midgard/logging.h"
|
3
|
+
#include "midgard/util.h"
|
4
|
+
#include "tyr/actor.h"
|
5
|
+
|
6
|
+
#include <boost/make_shared.hpp>
|
7
|
+
#include <boost/noncopyable.hpp>
|
8
|
+
#include <boost/property_tree/ptree.hpp>
|
9
|
+
#include <pybind11/pybind11.h>
|
10
|
+
|
11
|
+
#include <string>
|
12
|
+
|
13
|
+
namespace vt = valhalla::tyr;
|
14
|
+
namespace {
|
15
|
+
|
16
|
+
// configuring multiple times is wasteful/ineffectual but not harmful
|
17
|
+
// TODO: make this threadsafe just in case its abused
|
18
|
+
const boost::property_tree::ptree configure(const std::string& config) {
|
19
|
+
boost::property_tree::ptree pt;
|
20
|
+
try {
|
21
|
+
// parse the config and configure logging
|
22
|
+
rapidjson::read_json(config, pt);
|
23
|
+
|
24
|
+
auto logging_subtree = pt.get_child_optional("mjolnir.logging");
|
25
|
+
if (logging_subtree) {
|
26
|
+
auto logging_config = valhalla::midgard::ToMap<const boost::property_tree::ptree&,
|
27
|
+
std::unordered_map<std::string, std::string>>(
|
28
|
+
logging_subtree.get());
|
29
|
+
valhalla::midgard::logging::Configure(logging_config);
|
30
|
+
}
|
31
|
+
} catch (...) { throw std::runtime_error("Failed to load config from: " + config); }
|
32
|
+
|
33
|
+
return pt;
|
34
|
+
}
|
35
|
+
} // namespace
|
36
|
+
|
37
|
+
namespace py = pybind11;
|
38
|
+
|
39
|
+
PYBIND11_MODULE(_valhalla, m) {
|
40
|
+
py::class_<vt::actor_t>(m, "_Actor", "Valhalla Actor class")
|
41
|
+
.def(py::init<>([](std::string config) { return vt::actor_t(configure(config), true); }))
|
42
|
+
.def(
|
43
|
+
"route", [](vt::actor_t& self, std::string& req) { return self.route(req); },
|
44
|
+
"Calculates a route.")
|
45
|
+
.def(
|
46
|
+
"locate", [](vt::actor_t& self, std::string& req) { return self.locate(req); },
|
47
|
+
"Provides information about nodes and edges.")
|
48
|
+
.def(
|
49
|
+
"optimized_route",
|
50
|
+
[](vt::actor_t& self, std::string& req) { return self.optimized_route(req); },
|
51
|
+
"Optimizes the order of a set of waypoints by time.")
|
52
|
+
.def(
|
53
|
+
"matrix", [](vt::actor_t& self, std::string& req) { return self.matrix(req); },
|
54
|
+
"Computes the time and distance between a set of locations and returns them as a matrix table.")
|
55
|
+
.def(
|
56
|
+
"isochrone", [](vt::actor_t& self, std::string& req) { return self.isochrone(req); },
|
57
|
+
"Calculates isochrones and isodistances.")
|
58
|
+
.def(
|
59
|
+
"trace_route", [](vt::actor_t& self, std::string& req) { return self.trace_route(req); },
|
60
|
+
"Map-matching for a set of input locations, e.g. from a GPS.")
|
61
|
+
.def(
|
62
|
+
"trace_attributes",
|
63
|
+
[](vt::actor_t& self, std::string& req) { return self.trace_attributes(req); },
|
64
|
+
"Returns detailed attribution along each portion of a route calculated from a set of input locations, e.g. from a GPS trace.")
|
65
|
+
.def(
|
66
|
+
"height", [](vt::actor_t& self, std::string& req) { return self.height(req); },
|
67
|
+
"Provides elevation data for a set of input geometries.")
|
68
|
+
.def(
|
69
|
+
"transit_available",
|
70
|
+
[](vt::actor_t& self, std::string& req) { return self.transit_available(req); },
|
71
|
+
"Lookup if transit stops are available in a defined radius around a set of input locations.")
|
72
|
+
.def(
|
73
|
+
"expansion", [](vt::actor_t& self, std::string& req) { return self.expansion(req); },
|
74
|
+
"Returns all road segments which were touched by the routing algorithm during the graph traversal.")
|
75
|
+
.def(
|
76
|
+
"centroid", [](vt::actor_t& self, std::string& req) { return self.centroid(req); },
|
77
|
+
"Returns routes from all the input locations to the minimum cost meeting point of those paths.")
|
78
|
+
.def(
|
79
|
+
"status", [](vt::actor_t& self, std::string& req) { return self.status(req); },
|
80
|
+
"Returns nothing or optionally details about Valhalla's configuration.");
|
81
|
+
}
|
Binary file
|
File without changes
|
{pyvalhalla_git-3.5.1.post186.dist-info → pyvalhalla_git-3.5.1.post193.dist-info}/licenses/AUTHORS
RENAMED
File without changes
|
{pyvalhalla_git-3.5.1.post186.dist-info → pyvalhalla_git-3.5.1.post193.dist-info}/licenses/COPYING
RENAMED
File without changes
|
File without changes
|
{pyvalhalla_git-3.5.1.post186.dist-info → pyvalhalla_git-3.5.1.post193.dist-info}/top_level.txt
RENAMED
File without changes
|