-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace the MODIS Rapid Response handler with Worldview/GIBS #6
Comments
Just a note for future reference: the WMS endpoint can be something like |
we can do this with vapour/gdalio library(gdalio) #remotes::install_github("hypertidy/gdalio")
sdsnames <-
vapour::vapour_sds_names("https://gibs.earthdata.nasa.gov/wms/epsg3031/best/wms.cgi?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&LAYERS=MODIS_Terra_CorrectedReflectance_TrueColor&STYLES=&FORMAT=image%2Fpng&TRANSPARENT=false&CRS=EPSG:3031&HEIGHT=1024&WIDTH=1024&BBOX=-4194304,-4194304,4194304,4194304&TIME=2021-10-25")
source(system.file("raster_format/raster_format.codeR", package = "gdalio", mustWork = TRUE))
## choose the output structure
## 1. some other grid
template <- raster::raster(raadtools::readice())
gdalio_set_default_grid(template)
x1 <- gdalio_raster(sdsnames$subdataset[1L], bands = 1:3)
raster::plotRGB(x1) ## 2. native (there are various zoom levels)
ri <- vapour::vapour_raster_info(sdsnames$subdataset[1])
dims <- matrix(ri$overviews, nrow = 2)
gdalio_set_default_grid(list(extent = ri$extent, dimension = dims[,ncol(dims)-1], projection = ri$projection))
x2 <- gdalio_raster(sdsnames$subdataset[1L], bands = 1:3)
raster::plotRGB(x2) ## longlat
gdalio_set_default_grid(list(extent = c(-180, 180, -90, -40), dimension = c(1024, 684), projection = "OGC:CRS84"))
x3 <- gdalio_raster(sdsnames$subdataset[1L], bands = 1:3)
raster::plotRGB(x3) Created on 2021-10-25 by the reprex package (v2.0.1) |
Moved from ropensci/bowerbird#1
See https://earthdata.nasa.gov/earth-observation-data/near-real-time/rapid-response and earthdata.nasa.gov/about/science-system-description/eosdis-components/global-imagery-browse-services-gibs
The text was updated successfully, but these errors were encountered: