mappymatch.matchers.osrm#

Functions

parse_osrm_json(j, trace)

parse the json response from the osrm match service

Classes

OsrmMatcher([osrm_address, osrm_profile, ...])

pings an OSRM server for map matching

mappymatch.matchers.osrm.parse_osrm_json(j, trace)[source]#

parse the json response from the osrm match service

Parameters:
  • j (dict) -- the json object

  • trace (Trace)

Return type:

list[Match]

Returns:

a list of matches

class mappymatch.matchers.osrm.OsrmMatcher(osrm_address='http://router.project-osrm.org', osrm_profile='driving', osrm_version='v1')[source]#

pings an OSRM server for map matching

match_trace(trace)[source]#

Take in a trace of gps points and return a list of matching link ids

Return type:

MatchResult

Parameters:

trace (Trace)

Args:

trace: The trace to match

Returns:

A list of Match objects

match_trace_batch(trace_batch)[source]#

Take in a batch of traces and return a batch of matching link ids

Return type:

list[MatchResult]

Parameters:

trace_batch (list[Trace])

Args:

trace_batch: The batch of traces to match

Returns:

A batch of Match objects