Learn R Programming

shadow (version 0.1.3)

shadeFootprint: Shade footprint on the ground

Description

Creates a polygonal layer of shade footprints on the ground, given sun position and extruded obstacles (usually a buildings layer). The calculation method was inspired by Morel Weisthal's MSc thesis at Ben-Gurion University.

Usage

shadeFootprint(build, height_field, solar_pos, b = 0.01)

Arguments

build
A SpatialPolygonsDataFrame object specifying the buildings outline.
height_field
The name of the column with building height in buildings
solar_pos
A matrix with the solar azimuth (in degrees from North), and elevation
b
Buffer size for shade footprints of individual segments of a given polygon; used to eliminate minor internal holes in the resulting shade polygon.

Value

A SpatialPolygonsDataFrame object representing shade footprint plus buildings outline.

References

Weisthal, M. (2014). Assessment of potential energy savings in Israel through climate-aware residential building design (Doctoral dissertation, Ben-Gurion University of the Negev). http://aranne5.bgu.ac.il/others/WeisthalMorel.pdf

Examples

Run this code
data(build)
location = rgeos::gCentroid(build)
time = as.POSIXct("2004-12-24 13:30:00", tz = "Asia/Jerusalem")
solar_pos = maptools::solarpos(
  matrix(c(34.7767978098526, 31.9665936050395), ncol = 2),
  time
  )
footprint = shadeFootprint(build, "BLDG_HT", solar_pos)
plot(footprint, col = adjustcolor("lightgrey", alpha.f = 0.5))
plot(build, add = TRUE, col = "darkgrey")

Run the code above in your browser using DataLab