Description Usage Arguments Value Examples
Determine whether times are during daylight within a region
1 | isDaylight(datetime = NULL, timezone = "UTC", bbox = bbox_CONUS)
|
datetime |
Datetime in any Ymd H [MS] format or |
timezone |
Timezone used to interpret |
bbox |
Bounding box for the region of interest. Defaults to CONUS. |
Logical vector.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | library(MazamaSatelliteUtils)
library(MazamaSpatialUtils)
setSatelliteDataDir("~/Data/Satellite")
# Example with bbox from country shape
mx <- subset(SimpleCountries, countryCode == "MX")
mx_bbox <- sp::bbox(mx)
isDaylight(
datetime = "2019-09-06 12",
bbox = mx_bbox,
timezone = "UTC"
)
# Example with bbox from raster::extent()
scanFile <- goesaodc_downloadScanFiles(
satID = "G16",
datetime = "2019-09-06 18:00",
timezone = "UTC"
)
raster <- goesaodc_createScanRaster(
filename = scanFile,
cellSize = 0.1,
dqfLevel = 2
)
extent <- raster::extent(raster)
isDaylight(
datetime = "2019-09-06 12:00",
bbox = extent,
timezone = "UTC"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.