mappymatch is a package for map matching
Project description
mappymatch
mappymatch is a pure-python package developed by the National Renewable Energy Laboratory that maintains a collection of map matching algorithms and wrappers. The package was designed for ease of use and portabilty across platforms.
Installation
Check out the docs for install instructions.
Example Usage
The current primary workflow is to use osmnx to download a road network and match it using the LCSSMatcher
.
The LCSSMatcher
implements the map matching algorithm described in this paper:
usage:
from mappymatch import root
from mappymatch.matchers.lcss.lcss import LCSSMatcher
from mappymatch.utils.geo import geofence_from_trace
from mappymatch.maps.nx.readers.osm_readers import read_osm_nxmap
from mappymatch.constructs.trace import Trace
trace = Trace.from_csv(root() / "resources/traces/sample_trace_1.csv")
# generate a geofence polygon that surrounds the trace; units are in meters;
# this is used to query OSM for a small map that we can match to
geofence = geofence_from_trace(trace, padding=1e3)
# uses osmnx to pull a networkx map from the OSM database
road_map = read_osm_nxmap(geofence)
matcher = LCSSMatcher(road_map)
matches = matcher.match_trace(trace)
Example Notebooks
Example JupyterLab notebooks making use of mappymatch can be found in the mappymatch examples repository.
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
mappymatch-0.2.2.tar.gz
(29.6 kB
view hashes)
Built Distribution
mappymatch-0.2.2-py3-none-any.whl
(42.2 kB
view hashes)
Close
Hashes for mappymatch-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57c0d81221a4e7b4dc991fa304f76d589c6fd99acd9f6901e53b34c3595b21fe |
|
MD5 | 61ffa16a6a651fb45e6341ad398e1cc6 |
|
BLAKE2b-256 | 2edb486d5d3e46269cb3ffa4a6aea04a67ff7bbf8ba05f7c3169befa5c9f9ef7 |