Generate spatial points representing nodes on a SpatialLinesNetwork or sfNetwork.

sln2points(sln)

Arguments

sln

The SpatialLinesNetwork or sfNetwork to use.

See also

Examples

data(routes_fast) rnet <- overline(routes_fast, attrib = "length")
#> Warning: Too few points in geometry component at or near point -1.51673372 53.828874089999999
#> Warning: Too few points in geometry component at or near point -1.5356168100000001 53.828472859999998
#> Warning: Too few points in geometry component at or near point -1.5508065 53.824420150000002
#> Warning: Too few points in geometry component at or near point -1.5307123300000001 53.817556189999998
#> Warning: Too few points in geometry component at or near point -1.5193175299999999 53.815796030000001
#> Warning: Too few points in geometry component at or near point -1.51186139 53.811610979999998
#> Warning: Too few points in geometry component at or near point -1.5242047000000001 53.804098449999998
#> Warning: Too few points in geometry component at or near point -1.51673372 53.828874089999999
#> Warning: Too few points in geometry component at or near point -1.5356168100000001 53.828472859999998
#> Warning: Too few points in geometry component at or near point -1.5508065 53.824420150000002
#> Warning: Too few points in geometry component at or near point -1.5307123300000001 53.817556189999998
#> Warning: Too few points in geometry component at or near point -1.5193175299999999 53.815796030000001
#> Warning: Too few points in geometry component at or near point -1.51186139 53.811610979999998
#> Warning: Too few points in geometry component at or near point -1.5242047000000001 53.804098449999998
#> sl is invalid
#> sl is invalid
#> Warning: Invalid objects found; consider using set_RGEOS_CheckValidity(2L)
sln <- SpatialLinesNetwork(rnet)
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
#> Warning: CRS object has comment, which is lost in output
(sln_nodes <- sln2points(sln))
#> class : SpatialPoints #> features : 52 #> extent : -1.550964, -1.512596, 53.80432, 53.82957 (xmin, xmax, ymin, ymax) #> crs : +proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs
plot(sln)
plot(sln_nodes, add = TRUE)