`tnss_tree.Rd`

creates an approximated Steiner tree for a flow map visualization

tnss_tree( g, xy, xydummy, root, gamma = 0.9, epsilon = 0.3, elen = Inf, order = "random" )

g | original flow network (must be a one-to-many flow network, i.e star graph). Must have a weight attribute indicating the flow |
---|---|

xy | coordinates of "real" nodes |

xydummy | coordinates of "dummy" nodes |

root | root node id of the flow |

gamma | edge length decay parameter |

epsilon | smoothing factor for Douglas-Peucker Algorithm |

elen | maximal length of edges in triangulation |

order | in which order shortest paths are calculated ("random","weight","near","far") |

approximated Steiner tree from dummy and real nodes as igraph object

Use tnss_smooth to smooth the edges of the tree

Sun, Shipeng. "An automated spatial flow layout algorithm using triangulation, approximate Steiner tree, and path smoothing." AutoCarto, 2016.

David Schoch

xy <- cbind(state.center$x,state.center$y)[!state.name%in%c("Alaska","Hawaii"),] xy_dummy <- tnss_dummies(xy,root = 4) gtree <- tnss_tree(cali2010,xy,xy_dummy,root = 4,gamma = 0.9)