RasterizeTraj: Rasterize Trajectory

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function produces a grid over an specified area and then computes the frequency of lines that cross each cells' grid.

Usage

1
  RasterizeTraj(spLines, resolution=10000, reduce=TRUE, parallel=FALSE )

Arguments

spLines

An object of class SpatialLines created by the function Df2SpLines.

resolution

numeric vector of length 1 or 2 to set the resolution. If this argument is used, arguments ncols and nrows are ignored.

reduce

Boolean: If TRUE the result will be reduced to one raster object; if FALSE, this function will return a list of RasterLayer. The size of the list is equal to the number of available cores in the system.

parallel

Boolean: If TRUE, the rasterize process will be made in parallel.

Details

Because this function do all the process in parallel, it calls the function SplitSpLines and divides the spLines object into N sub sets of Spatial Lines objects, where N is the number of cores availables in the System.

Value

A Object of class RasterLayer or a list of objects RasterLayer.

Author(s)

Thalles Santos Silva

See Also

SplitSpLines, raster.

Examples

1
2
3
4
  
 crs <- "+proj=longlat +datum=NAD83 +no_defs +ellps=GRS80 +towgs84=0,0,0"
 air.traj.lines <- Df2SpLines(air.traj, crs)
 raster.lines <- RasterizeTraj(air.traj.lines, reduce=TRUE, resolution=10000, parallel=FALSE)

opentraj documentation built on May 1, 2019, 8:47 p.m.