Description Usage Arguments Value References Examples
Creates a polygonal layer of shadow footprints on the ground, taking into account:
Obstacles outline (obstacles
), given by a polygonal layer with a height attribute (obstacles_height_field
)
Sun position (solar_pos
), given by azimuth and elevation angles
The calculation method was inspired by Morel Weisthal's MSc thesis at the Ben-Gurion University of the Negev.
1 2 3 4 5 6 7 8 | ## S4 method for signature 'SpatialPolygonsDataFrame'
shadowFootprint(
obstacles,
obstacles_height_field,
solar_pos = solarpos2(obstacles, time),
time = NULL,
b = 0.01
)
|
obstacles |
A |
obstacles_height_field |
Name of attribute in |
solar_pos |
A |
time |
When |
b |
Buffer size for shadow footprints of individual segments of a given polygon; used to eliminate minor internal holes in the resulting shadow polygon. |
A SpatialPolygonsDataFrame
object representing shadow footprint, plus buildings outline. Object length is the same as that of the input obstacles
, with an individual footprint feature for each obstacle.
Weisthal, M. (2014). Assessment of potential energy savings in Israel through climate-aware residential building design (MSc Thesis, Ben-Gurion University of the Negev). https://www.dropbox.com/s/bztnh1fi9znmswj/Thesis_Morel_Weisthal.pdf?dl=1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | time = as.POSIXct("2004-12-24 13:30:00", tz = "Asia/Jerusalem")
proj4string(build) = CRS("+init=epsg:32636")
location_geo = matrix(c(34.7767978098526, 31.9665936050395), ncol = 2)
solar_pos = maptools::solarpos(location_geo, time)
footprint1 = ## Using 'solar_pos'
shadowFootprint(
obstacles = build,
obstacles_height_field = "BLDG_HT",
solar_pos = solar_pos
)
footprint2 = ## Using 'time'
shadowFootprint(
obstacles = build,
obstacles_height_field = "BLDG_HT",
time = time
)
all.equal(footprint1, footprint2)
footprint = footprint1
plot(footprint, col = adjustcolor("lightgrey", alpha.f = 0.5))
plot(build, add = TRUE, col = "darkgrey")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.