Skip to content

henrik-wolf/ShadowGraphs.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ShadowGraphs

Stable Dev Build Status Code Style: Blue

this package contains code related to parsing, creating and working with OSM Networks in the context of the CoolWalks project.

User Interface

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 the LightOSM.jl provided download_osm_network function. (Either a Dict or a LightXML struct)
  • shadow_graph_from_file same as above, but with a filepath
  • shadow_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

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

  1. keep only nodes at the ends of ways and those who are relevant for the topology of the graph
  2. 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.

Check out the documentation for a detailed description of the MetaDiGraph produced.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages