Loading a map from geofabrik? #205
pbaekgaard
started this conversation in
General
Replies: 1 comment
-
|
@pbaekgaard - thanks for reaching out. It should be possible to create a single larger map to match your traces to rather than just downloading a map for each trace. The easiest way would be to use osmnx to download your map and then create an NxMap from that, something like: import osmnx as ox
from mappymatch.maps.nx.readers.osm_readers import parse_osmnx_graph, NetworkType
# define a bounding box (left, bottom, right, top)
bbox = -122.43, 37.78, -122.41, 37.79
# create network from that bounding box
G = ox.graph.graph_from_bbox(bbox, network_type="drive")
# optionally save the graph
ox.io.save_graphml(G, "where/to/save/file.graphml")
nxmap = NxMap(parse_osmnx_graph(G, network_type=NetworkType.DRIVE))
# proceed with matching as shown in the documentationNote that osmnx has many more ways to download graphs (see here). If you need to ability to directly load the geofabrik files, you could check out https://github.com/pyrosm/pyrosm but we haven't built in support for this into our package. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We are sitting here doing a project at the University of Aalborg, Denmark.
We are trying to utilize mappymatch to do some mapmatching on trajectories.
We have a lot of trajectories (the T-Drive dataset) that we want to do mapmatching on.
Is it possible to use a geofabrik osm file to load the map to mapmatch onto rather than downloading the geofences for each of the trajectories and thus speeding up the process and using less resources on downloading, by just making a global NxMap fx?
We have tried extensively to make an NxMap, but we keep getting into problems that we cant figure out.
Beta Was this translation helpful? Give feedback.
All reactions