print: Printing functions

Description Usage Arguments See Also Examples

Description

The print function covers all objects in the rstac package:

The rstac package objects visualization is based on markdown, a lightweight markup language. You can paste the output into any markdown editor for a better visualization.

Call print() function to print the rstac's objects. You can determine how many items will be printed using n parameter.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## S3 method for class 'RSTACQuery'
print(x, ...)

## S3 method for class 'STACCatalog'
print(x, ...)

## S3 method for class 'STACCollectionList'
print(x, n = 10, ...)

## S3 method for class 'STACCollection'
print(x, ...)

## S3 method for class 'STACItemCollection'
print(x, n = 10, ..., tail = FALSE)

## S3 method for class 'STACItem'
print(x, ...)

Arguments

x

either a RSTACQuery object expressing a STAC query criteria or any RSTACDocument.

...

other parameters passed in the functions.

n

number of entries to print. Each object has its own rule of truncation: the STACCollection objects will print 10 links by default. If the object has less than 20 collections, all collections will be shown. In STACItemCollection, 10 features will be printed by default. To show all entries, use n = Inf.

tail

A logical value indicating if last features in STACItemCollection object must be show.

See Also

stac stac_search collections items

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# STACItemCollection object
stac_item_collection <-
  stac("https://brazildatacube.dpi.inpe.br/stac/") %>%
  stac_search(collections = "CB4_64_16D_STK-1",
         bbox = c(-47.02148, -12.98314, -42.53906, -17.35063),
         limit = 15) %>%
  get_request()

print(stac_item_collection, n = 10)

# STACCollectionList object
stac_collection <-
    stac("https://brazildatacube.dpi.inpe.br/stac/") %>%
    collections() %>%
    get_request()

print(stac_collection, n = 5)

# RSTACQuery object
obj_rstac <- stac("https://brazildatacube.dpi.inpe.br/stac/")

print(obj_rstac)

rstac documentation built on July 10, 2021, 5:08 p.m.