vein (version 0.7.8)

emis_dist: Allocate emissions into spatial objects (street emis to grid)

Description

emis_dist allocates emissions proportionally to each feature. "Spatial" objects are converter to "sf" objects. Currently, 'LINESTRING' or 'MULTILINESTRING' supported. The emissions are distributed in each street.

Usage

emis_dist(gy, spobj, pro, osm, verbose = TRUE)

Arguments

gy

Numeric; a unique total (top-down)

spobj

A spatial dataframe of class "sp" or "sf". When class is "sp" it is transformed to "sf".

pro

Matrix or data-frame profiles, for instance, pc_profile.

osm

Numeric; vector of length 5, for instance, c(5, 3, 2, 1, 1). The first element covers 'motorway' and 'motorway_link. The second element covers 'trunk' and 'trunk_link'. The third element covers 'primary' and 'primary_link'. The fourth element covers 'secondary' and 'secondary_link'. The fifth element covers 'tertiary' and 'tertiary_link'.

verbose

Logical; to show more info.

Examples

Run this code
# NOT RUN {
{
data(net)
data(pc_profile)
po <- 1000
t1 <- emis_dist(gy = po, spobj = net)
head(t1)
sum(t1$gy)
#t1 <- emis_dist(gy = po, spobj = net, osm = c(5, 3, 2, 1, 1) )
t1 <- emis_dist(gy = po, spobj = net, pro = pc_profile)
}
# }

Run the code above in your browser using DataLab