add_polid: Add polygon id to lines road network

View source: R/add_polid.R

add_polidR Documentation

Add polygon id to lines road network

Description

Sometimes you need to add polygon id into your streets road network. add_polid add add_polid id into your road network cropping your network by.

For instance, you have open street maps road network the you have the polygon of your regions. This function adds the id of your polygon as a new column in the streets network.

Usage

add_polid(polyg, street, by)

Arguments

polyg

sf object POLYGON or sp

street

streets road network class sf or sp

by

Character indicating the column with the id in polyg

See Also

emis_to_streets

Examples

## Not run: 
data(net)
nets <- sf::st_as_sf(net)
bb <- sf::st_as_sf(sf::st_as_sfc(sf::st_bbox(nets)))
bb$id <- "a"
a <- add_polid(polyg = bb, street = nets, by = "id")

## End(Not run)

vein documentation built on April 30, 2023, 1:10 a.m.