No project description provided
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file osm_roads-0.23.tar.gz
.
File metadata
- Download URL: osm_roads-0.23.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f0a496c91cc02997f918ec2c07cfd56649fae31512244d9fcc6209258d303e9 |
|
MD5 | 84d18649340d1f2223d30d9fd6ae5868 |
|
BLAKE2b-256 | 120a41d6e0b07f9c6157efa97ce47b1d448e88b093b0617d5a27333f36b8d9ae |
File details
Details for the file osm_roads-0.23-py3-none-any.whl
.
File metadata
- Download URL: osm_roads-0.23-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0700218ac6f859d9ab87ae299f51a459340cdca7ab93b09d2b6e722fdd1bac8 |
|
MD5 | 7c591a45bb16edd3a2826c46367c3105 |
|
BLAKE2b-256 | 87237e0a3a5acccf8ed8bbb238b76e2bbd478173bf5c1b4fd15e020104bac0df |