-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
In order to simplify the creation of an NxMap from an osmnx graph, we could create a new classmethod, something like NxMap.from_osmnx_graph that returns an NxMap from an osmnx graph. Most of the plumbing is already in place but it would just clean up how the user builds the map. Currently, the procedure for getting an NxMap from an arbitrary osmnx graph looks like this:
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")
nxmap = NxMap(parse_osmnx_graph(G, network_type=NetworkType.DRIVE))Metadata
Metadata
Assignees
Labels
No labels