R/nicfi_utils.R
nicfi_mosaics.Rd
Returns all 'monthly' or 'bi-annually' mosaic files of the NICFI data
nicfi_mosaics(
planet_api_key,
type = "monthly",
crs_bbox = 4326,
URL = "https://api.planet.com/basemaps/v1/mosaics",
verbose = FALSE
)
a character string specifying the Planet API key (see the references on how to acquire this key)
a character string specifying the type of NICFI data. It can be either 'monthly' or 'bi_annually'
an integer specifying the Coordinates Reference System for the bounding box computation only.
this character string specifies the default URL which is required to come to the output mosaic metadata information
a boolean. If TRUE then information will be printed out in the console
an object of class list
https://developers.planet.com/quickstart/
https://developers.planet.com/quickstart/apis/
https://developers.planet.com/docs/basemaps/reference/#tag/Basemaps-and-Mosaics
if (FALSE) {
require(PlanetNICFI)
api_key = 'use_your_planet_nicfi_API_key'
#........
# monthly
#........
mosaic_files = nicfi_mosaics(planet_api_key = api_key,
type = 'monthly',
crs_bbox = 4326,
URL = 'https://api.planet.com/basemaps/v1/mosaics',
verbose = TRUE)
#............
# bi-annually
#............
mosaic_files = nicfi_mosaics(planet_api_key = api_key,
type = 'bi_annually',
crs_bbox = 4326,
URL = 'https://api.planet.com/basemaps/v1/mosaics',
verbose = TRUE)
#........................................
# WKT of the area covered from NICFI data
#........................................
nicfi_aoi = sf::st_as_sfc(mosaic_files$dtbl_mosaic$mosaic_wkt[1], crs = 4326)
cat(sf::st_as_text(nicfi_aoi))
}