Divides SpatialLinesDataFrame objects into separate Lines. Each new Lines object is the aggregate of a single number of aggregated lines.
gsection(sl, buff_dist = 0)
SpatialLinesDataFrame with overlapping Lines to split by number of overlapping features.
A number specifying the distance in meters of the buffer to be used to crop lines before running the operation. If the distance is zero (the default) touching but non-overlapping lines may be aggregated.
1 2 3 4 5 6 7 8 9 10 11 12
sl <- routes_fast[2:4,] rsec <- gsection(sl) rsec_buff <- gsection(sl, buff_dist = 1) plot(sl, lwd = 9, col = 1:nrow(sl)) plot(rsec, col = 5 + (1:length(rsec)), add = TRUE, lwd = 3) plot(rsec_buff, col = 5 + (1:length(rsec_buff)), add = TRUE, lwd = 3) ## Not run: sl <- routes_fast_sf[2:4,] rsec <- gsection(sl) rsec <- gsection(sl, buff_dist = 100) # 4 features: issue ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.