Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dodgr_to_sf

dodgr_to_sf


Description

Convert a dodgr graph into an equivalent sf object. Works by aggregating edges into LINESTRING objects representing longest sequences between all junction nodes. The resultant objects will generally contain more LINESTRING objects than the original sf object, because the former will be bisected at every junction point.

Usage

dodgr_to_sf(graph)

Arguments

graph

A dodgr graph

Value

Equivalent object of class sf.

Note

Requires the sf package to be installed.

See Also

Examples

hw <- weight_streetnet (hampi)
nrow(hw) # 5,729 edges
xy <- dodgr_to_sf (hw)
dim (xy) # 764 edges; 14 attributes

dodgr

Distances on Directed Graphs

v0.2.11
GPL-3
Authors
Mark Padgham [aut, cre], Andreas Petutschnig [aut], Robin Lovelace [ctb], Andrew Smith [ctb], Malcolm Morgan [ctb], Shane Saunders [cph] (Original author of included code for priority heaps)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.