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

Description Usage Arguments Value References Examples

View source: R/nicfi_utils.R

Description

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

Usage

1
2
3
4
5
6
7
nicfi_mosaics(
  planet_api_key,
  type = "monthly",
  crs_bbox = 4326,
  URL = "https://api.planet.com/basemaps/v1/mosaics",
  verbose = FALSE
)

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

Value

an object of class list

References

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

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

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

Examples

 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
## Not run: 

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


## End(Not run)

PlanetNICFI documentation built on July 22, 2021, 9:06 a.m.