Calculate metrics from OpenStreetMap (OSM) vector data, at specific point locations and buffer radii. Currently supports vector data of buildings (polygons) and roads (lines).
Usage
calc_osm(
vector,
name = NULL,
points,
buffer_sizes,
building_ndsm = NULL,
building_height = "height",
building_levels = "levels",
road_lanes = "lanes"
)Arguments
- vector
sf dataframe of either buildings (polygons) or roads (lines).
- name
Specify either
"buildings"or"roads".- points
Point locations (sf object) to calculate the metrics.
- buffer_sizes
Radius of circle (in mapunits) for each point location; metrics will be calculated within the buffer area.
- building_ndsm
SpatRaster object (
terra::rast()) (optional). A continuous raster of the normalised Digital Surface Model, used to calculate building heights. If absent (NULL) and the variable is named inpredictors_osm, the columnbuilding_heightis used instead. Defaults toNULL.- building_height
Column name in
vectorfor building height. Defaults to"height".- building_levels
Column name in
vectorfor the number of building levels. Defaults to"levels". Column data should be numeric.- road_lanes
Column name in
vectorfor the number of lanes per road line. Defaults to"lanes". Column data should be numeric.
