lsat_search: Search Landsat images via the sat-api

View source: R/lsat_search.R

lsat_searchR Documentation

Search Landsat images via the sat-api

Description

Search Landsat images via the sat-api

Usage

lsat_search(
  collection = NULL,
  datetime = NULL,
  cloud_cover = NULL,
  sun_azimuth = NULL,
  sun_elevation = NULL,
  row = NULL,
  path = NULL,
  limit = 10,
  page = 1,
  as = "df",
  ...
)

Arguments

collection

(character) collection name

datetime

(character) one or two dates. if one date, it's treated as a single point date time. if two dates, its treated as a date period

cloud_cover

(integer) cloud cover number

sun_azimuth

(numeric) sun azimuth number

sun_elevation

(numeric) sun elevation number

row

(integer) row

path

(integer) path

limit

(integer) limit number of results. default: 10

page

(integer) page number to return. default: 1

as

(character) if df we parse from JSON to an R list with data.frame's where possible. if 'list' then an R list; if json we give you back the JSON as character

...

curl args passed on to crul::HttpClient()

Value

an R list with data.fraem's if as=df; an R list w/o attempting to parse to data.frame's where possible; otherwise JSON as character

References

https://github.com/sat-utils/sat-api

Examples

## Not run: 
# collection input
lsat_search(collection = "sentinel-2")
lsat_search(collection = "landsat-8")

# dates
lsat_search(datetime = "2017-08")
z <- lsat_search(datetime = c("2016-12-31", "2017-01-01"))
z

# cloud cover
lsat_search(collection = "landsat-8", cloud_cover = 0)
lsat_search(collection = "landsat-8", cloud_cover = c(0, 20))

# sun azimuth
lsat_search(sun_azimuth = 162)

# row/path
lsat_search(row = 31, path = 128)

# pagination
lsat_search(limit = 0)
lsat_search(limit = 1)
lsat_search(limit = 3, page = 2)

# parsed to list, or not gives json
lsat_search(datetime = "2017-08", limit = 3, as = 'df')
lsat_search(datetime = "2017-08", limit = 3, as = 'list')
lsat_search(datetime = "2017-08", limit = 3, as = 'json')

# curl options
lsat_search(verbose = TRUE)

## End(Not run)

ropensci/getlandsat documentation built on Sept. 11, 2022, 7:54 a.m.