Learn R Programming

PlanetNICFI (version 1.0.5)

nicfi_mosaics: Returns all 'monthly' or 'bi-annually' mosaic files of the NICFI data

Description

Returns all 'monthly' or 'bi-annually' mosaic files of the NICFI data

Usage

nicfi_mosaics(
  planet_api_key,
  type = "monthly",
  crs_bbox = 4326,
  URL = "https://api.planet.com/basemaps/v1/mosaics",
  verbose = FALSE
)

Value

an object of class list

Arguments

planet_api_key

a character string specifying the Planet API key (see the references on how to acquire this key)

type

a character string specifying the type of NICFI data. It can be either 'monthly' or 'bi_annually'

crs_bbox

an integer specifying the Coordinates Reference System for the bounding box computation only.

URL

this character string specifies the default URL which is required to come to the output mosaic metadata information

verbose

a boolean. If TRUE then information will be printed out in the console

References

https://developers.planet.com/quickstart/

https://developers.planet.com/quickstart/apis/

https://developers.planet.com/docs/basemaps/reference/#tag/Basemaps-and-Mosaics

Examples

Run this code

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))

}

Run the code above in your browser using DataLab