You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is my code and I want to visualize the gpx data for testing.
`from leuvenmapmatching.util.gpx import gpx_to_path
from leuvenmapmatching.matcher.distance import DistanceMatcher
from leuvenmapmatching.map.inmem import InMemMap
from leuvenmapmatching import visualization as mmviz
map_con = InMemMap("mymap", use_latlon=False)
track = gpx_to_path("route.gpx")
matcher = DistanceMatcher(map_con,
max_dist=100, max_dist_init=25, # meter
min_prob_norm=0.001,
non_emitting_length_factor=0.75,
obs_noise=50, obs_noise_ne=75, # meter
dist_noise=50, # meter
non_emitting_states=True,
max_lattice_width=5)
states, lastidx = matcher.match(track)
Traceback (most recent call last):
File "C:\Users\Jason...\Data_prep\MapMatching.py", line 20, in
mmviz.plot_map(map_con, matcher=matcher,
File "C:\Users\Jason...\Data_prep\venv\Lib\site-packages\leuvenmapmatching\visualization.py", line 62, in plot_map
bb = map_con.bb()
^^^^^^^^^^^^
File "C:\Users\Jason...\Data_prep\venv\Lib\site-packages\leuvenmapmatching\map\inmem.py", line 187, in bb
glat, glon = zip(*[t[0] for t in self.graph.values()])
^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 0)
Please, I wanna know how to fix it.
The text was updated successfully, but these errors were encountered:
This is my code and I want to visualize the gpx data for testing.
`from leuvenmapmatching.util.gpx import gpx_to_path
from leuvenmapmatching.matcher.distance import DistanceMatcher
from leuvenmapmatching.map.inmem import InMemMap
from leuvenmapmatching import visualization as mmviz
map_con = InMemMap("mymap", use_latlon=False)
track = gpx_to_path("route.gpx")
matcher = DistanceMatcher(map_con,
max_dist=100, max_dist_init=25, # meter
min_prob_norm=0.001,
non_emitting_length_factor=0.75,
obs_noise=50, obs_noise_ne=75, # meter
dist_noise=50, # meter
non_emitting_states=True,
max_lattice_width=5)
states, lastidx = matcher.match(track)
mmviz.plot_map(map_con, matcher=matcher,
use_osm=True, zoom_path=True,
show_labels=False, show_matching=True, show_graph=False,
filename="my_osm_plot.png")`
However, the following error appear.
Traceback (most recent call last):
File "C:\Users\Jason...\Data_prep\MapMatching.py", line 20, in
mmviz.plot_map(map_con, matcher=matcher,
File "C:\Users\Jason...\Data_prep\venv\Lib\site-packages\leuvenmapmatching\visualization.py", line 62, in plot_map
bb = map_con.bb()
^^^^^^^^^^^^
File "C:\Users\Jason...\Data_prep\venv\Lib\site-packages\leuvenmapmatching\map\inmem.py", line 187, in bb
glat, glon = zip(*[t[0] for t in self.graph.values()])
^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 0)
Please, I wanna know how to fix it.
The text was updated successfully, but these errors were encountered: