OpenStreetMap Roads
The package takes an openstreetmap pbf file and converts it to a geohash prefix based hdf5 file. It provides an api to then do a fast map matching for any latitude, longitude that comes under the bounding box of the pbf file.
Installation
pip install osm-roads
Importing and loading the pbf file
from osm_roads.osm_roads import OsmRoads
way_finder = OsmRoads() way_finder.load_osm_pbf("bengaluru.pbf")
Search for map matching with latitude and longitude
way_finder.get_road_type(12.934005898750094, 77.61075025215672)
Saving the current PBF to a trie
way_finder.export_trie('bangalore_updated.trie')
Loading the trie from file
way_finder.load_trie('bangalore_updated.trie')
How to get PBF files and slice them
-
Visit the OpenStreetMap Wiki. The file used in the example is downloaded from GeoFabrik, one of the mirrors of OSM and sliced using Osmium Tool
-
Install the Osmium Tool (works well in linux). sudo apt-get install -y osmium-tool
-
Run "osmium extract -b 77.343833,13.159493,77.905509,12.830316 southern-zone-latest.osm.pbf -o bengaluru.pbf" (replace the bounding box lat,lons as per your need)
Metadata
Release files for osm-roads 0.24
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| osm_roads-0.24.tar.gz | 4.5 kB | Without provenance | Details for osm_roads-0.24.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| osm_roads-0.24-py3-none-any.whl | Python 3 | none | any | Details for osm_roads-0.24-py3-none-any.whl |
Total release size: 8.9 kB
Release files / osm_roads-0.24.tar.gz
| Download URL | osm_roads-0.24.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f51dd36febbbd9ff7cbda519ca381d8cbc1488110c852ba9c1b20a02c5d1dbc
|
|
BLAKE2b-256 checksum How to use checksums |
99f60c0755168f08e69a7e9886ab2dcb4dbcafa1eeec3e96bab12bc5572c0732
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|
Release files / osm_roads-0.24-py3-none-any.whl
| Download URL | osm_roads-0.24-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9fff511af37ebb3ea71ad1106d109c9dac34b20b29887ea4b4579a8bd44bb9ec
|
|
BLAKE2b-256 checksum How to use checksums |
82023d18f98796690b5aecc9b17889fffd2ce4b6451e3360dcb6cfdb690bc256
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
|
Security for osm-roads 0.24
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.