sun.zen | R Documentation |
This function will return the mean solar zenith angle for a given input raster with a given projection. Based on the zenith function (package GeoLight). Function will convert the coordinates to WGS 84 Lat Lon and use the mean longitude and latitude for the calculation of the solar zenith angle.
sun.zen(ras,time)
ras |
Raster containing a spatial reference system. Function will convert the coordinates to WGS 84 Lat Lon. |
time |
Overpassing time / time when the scene was aquired. Time format 'POSIXct', e.g. "1990-01-01 10:00:00" |
crs.code |
CRS code for the respective image. Default: crs.code = CRS("+init=epsg:4326"). |
Most likely, an occuring error stems from a to large grid -> crop grid before the calculation of the solar zenit angle!
scalar
red <- system.file("extdata", "B30.TIF", package="TriangleMethod") red <- raster(red) zen = sun.zen(red,"1980-11-14 10:00:00")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.