buffer_windrose: A wind-rose shaped buffer function

Description Usage Arguments Value Examples

View source: R/buffer_windrose.R

Description

buffer_windrose creates a wind-rose based buffer shape.

Usage

1
buffer_windrose(point, wind_frequency_df, radius = 100, width_factor = 2)

Arguments

point

Centre point of the buffer, must equal to true in: sf::st_is(point, "POINT")

wind_frequency_df

A wind frequency table, in the format provided by "openair::windRose(wind_sample)$data"

radius

radius of the buffer (numeric). The radius of the largest sub-wedge of the wind-rose shaped buffer

width_factor

Scaling factor of the width of sub-wedges (numeric). Smaller number (<1) emphasize less-dominant wind-directions, (>1) emphasize dominant wind-directions.

Value

An object of class sfc_POLYGON

Examples

1
2
3
4
5
6
7
8
9
example_point = sf::st_point(c(1,2))
example_point = sf::st_sfc(example_point)
example_point = sf::st_sf(example_point)

openair::windRose(wind_sample) -> wind_sample_wind_rose
wind_sample_wind_rose$data -> wind_frequency_df

buffer_windrose(example_point, wind_frequency_df, 100, 0.5) -> windrose_shaped_buffer
plot(windrose_shaped_buffer)

buffeRs documentation built on Aug. 22, 2021, 9:07 a.m.