LightOSM.jl icon indicating copy to clipboard operation
LightOSM.jl copied to clipboard

[WIP] Simplify Graph

Open rush42 opened this issue 2 years ago • 8 comments

This PR implements an algorithm for simplifying the topology of an OSMGraph object. It is adapted from osmnx.

This PR is work in progress, and a few issues have to be discussed.

TODO:

  1. the output format of the simplification procedure (rn it returns a DiGraph and two DataFrames: one for nodes and the other for edges (which also contains the edge geometry) )
  2. reference to the original OSM objects (an edge can consist of serveral ways)
  3. turn restrictions
  4. type stability and code generalization for types

Below is an example for Tiergarten district in Mitte, Berlin, Germany:

Before the simplification: nodes: 2976, egdes: 4727 before

After the simplification: nodes: 683, edges: 1384 after

I will upload an example script the following days.

rush42 avatar Jan 03 '22 16:01 rush42