solarpos2 | R Documentation |
This is a wrapper function around suntools::solarpos
, adapted for accepting location as a Spatial*
layer or a Raster
. The function calculates layer centroid, transforms it to lon-lat, then calls suntools::solarpos
to calculate solar position(s) for that point at the given time(s)
solarpos2(location, time)
location |
A |
time |
A |
A matrix
with two columns representing sun position(s); first column is the solar azimuth (in decimal degrees from North), second column is sun elevation (in decimal degrees); rows represent different times corresponding to time
time = as.POSIXct("2004-12-24 13:30:00", tz = "Asia/Jerusalem")
proj4string(build) = CRS("EPSG:32636")
solarpos2(build, time)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.