this package contains code related to parsing, creating and working with OSM Networks in the context of the CoolWalks project.
Currently, there are three user facing methods for loading/importing/parsing data to a shadow graph (a MetaDiGraph
instance):
shadow_graph_from_object
this one creates the shadow graph from the return value of calling theLightOSM.jl
provideddownload_osm_network
function. (Either a Dict or a LightXML struct)shadow_graph_from_file
same as above, but with a filepathshadow_graph_from_download
same as above, but downloads the graph first.
The syntax for these functions mainly follows the LightOSM.jl
counterparts. For now, look there for Documentation on the available methods.
The shadow graph is an instance of a MetaDiGraph
object. During creation, we build the LightOSM graph, which then informs the content of the shadow graph.
The main distinction between the OSMGraph
and the shadow graph is, that we
- keep only nodes at the ends of ways and those who are relevant for the topology of the graph
- attach all relevant data as
props
to the edges and nodes.
Since the MetaDiGraph
type does not support multi-edges, we introduce helper nodes and edges in the following cases:
- if we want to add an edge between distinct nodes where an edge already exists, we add a node to the graph and connect the start and destination nodes to this one.
- if we want to add a self edge, we create two helper nodes and connect these to the start and destination in the appropriate order.