View source: R/geometrical_functions_sf.R
lixelize_lines.mc | R Documentation |
Cut the lines of a feature collection of linestrings into lixels with a specified minimal distance may fail if the line geometries are self intersecting with multicore support.
lixelize_lines.mc(
lines,
lx_length,
mindist = NULL,
verbose = TRUE,
chunk_size = 100
)
lines |
A feature collection of linestrings to convert to lixels |
lx_length |
The length of a lixel |
mindist |
The minimum length of a lixel. After cut, if the length of the final lixel is shorter than the minimum distance, then it is added to the previous lixel. If NULL, then mindist = maxdist/10 |
verbose |
A Boolean indicating if a progress bar must be displayed |
chunk_size |
The size of a chunk used for multiprocessing. Default is 100. |
A feature collection of linestrings
data(mtl_network)
future::plan(future::multisession(workers=1))
lixels <- lixelize_lines.mc(mtl_network,150,50)
## make sure any open connections are closed afterward
if (!inherits(future::plan(), "sequential")){
future::plan(future::sequential)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.