Description Usage Arguments Details Value Author(s) See Also Examples
This function divides an object of class SpatialLines-class
defined by the argument
[sp.lines] into a number of sub sets of SpatialLines defined by the argument [into].
1 2 | # divides the SpatialLines Object into 8 sub sets of SpatialLines
SplitSpLines(sp.lines, into)
|
sp.lines |
Object of class |
into |
Number of times that the sp.lines object must be divided. |
If the number provided by the argument [into] is not multiple of the number of lines in the SpatialLines object, the last element of the list will contain a SpatialLines object with more lines than the first ones. Thus, the original SpatialLines object will not be equally divided.
Although this function might be used seperately, the SplitSpLines function is called by
the RasterizeTraj
function in order to split the spLines and hence,
do the process in parallel.
Returns a list of SpatialLines Object.
Thalles Santos Silva
SpatialLines-class
, Df2SpLines
.
1 2 3 4 5 6 | ## split the SpatialLines object in a list with 8 SpatialLines objects
crs <- "+proj=longlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0"
air.traj.lines <- Df2SpLines(air.traj, crs)
lines.list <- SplitSpLines(air.traj.lines, 8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.