road_hwr: Calculate streets height-width ratio

Description Usage Arguments Details Examples

View source: R/road_hwratio.R

Description

Calculates the ratio between buildings' height and streets' width (H/W) on two sides of streets with two options available. The ratio is defined as the average height of buildings which intersect with streets to the width of streets.

Usage

1
street_hwr (building, street, option = ("average", "weighted"))

Arguments

option

Defines the method by which the ratio of buildings' height and the streets width is calculated. If option = "average", it returns the ratio of buildings' average height to the width of streets. If option = "weighted", it returns the ratio of buildings' weighted average height (with the length of buildings' intersection with street as weight) to the width of the streets.

building

A Simple Feature containing the building footprints of a city

street

A Simple Feature containing the street network of a city.

Details

To calculate the height-width ratio of streets, the width of streets should first be calculated. It returns the height-width ratio of every street to the Simple Feature street. If the translation lines of streets ("street") and the buildings ("city") does not have intersection, it will return NA.

Examples

1
2
3
4
5
6
7
8
## Not run:
building <-data(building)
street<-data(street)
street_hwr (building, street, option = "average")
building <-data(building)
street<-data(street)
street_hwr (building, street, option = "weighted")
## End(Not run)

lunliu454/streetchar documentation built on Dec. 21, 2021, 12:43 p.m.