Description Usage Arguments Details Examples
Generate and manage collection of tiles from Theia. This collection can be
created either from a cart file ('.meta4') downloaded from Theia website,
from a TheiaQuery
object or from a list of
TheiaTile
(not implemented yet).
1 2 3 4 5 6 7 8 9 10 11 12 13 | c <- TheiaCollection$new(cart.path = NULL,
tiles = NULL,
query = NULL,
dir.path = NULL,
check = TRUE)
quiet = TRUE)
c$download(auth, overwrite = FALSE, check = TRUE, quiet = TRUE)
c$check()
c$status
c$extract(overwrite = FALSE, dest.dir = NULL)
c$read(bands)
c$as_gdalcube(out.file = "gdalcube_collection.sqlite")
|
A TheiaCollection
object
The path to the directory containing zip files
Whether or not to check existing files on collection's creation
Control verbose output
A list of TheiaTile objects
An XML cart parsed from a 'meta4' file downloaded from Theia
website. Used only if Collection is created from a cart
A TheiaQuery object, used only if collection is created
from a TheiaQuery object. Can also be a list with search terms. In this
case, it will create a 'TheiaQuery' object from it. See
TheiaQuery
for details on query syntax
A character string giving the file path to Theia credentials.
Or a TheiaAuth
object
Overwrite existing tiles (default to 'FALSE')
A character vector of bands to load from tiles
Filename to store gdalcubes' image collection
TheiaCollection$new()
Create a new instance of the class
c$download(overwrite = FALSE, check = TRUE)
Download the tiles of the collection
and check the resulting files
$ccheck()
Check the tiles of the collection
c$status
Return the status of each tile of the collection
c$extract(overwrite = FALSE, dest.dir = NULL)
Extract archives to
dest.dir if supplied, or to the same directory as the archives otherwise
c$read(bands)
Read requested bands, apply corrections on values
(as specified in Theia's product information), and return a list of
RasterStack objects (one stack per tile)
c$as_gdalcube(out.file)
Create a 'gdalcubes' image collection from
downloaded tiles. See https://github.com/appelmar/gdalcubes_R for
more details.
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 35 | # Create a collection from a query
## Create a query to Theia database, looking for tiles from Sentinel2
## satellite around Grenoble, between 2018-07-01 and 2018-07-06.
query <- list(collection = "SENTINEL2",
town = "Grenoble",
start.date = "2018-07-01",
end.date = "2018-07-06")
## Create a collecion of tiles from this query
mycollection <- TheiaCollection$new(query = query, dir.path = ".")
print(mycollection)
# Alternatively, you can create a collection from a cart file (that you can
# download from Theia's website)
cart.path <- system.file("extdata", "cart.meta4", package = "theiaR")
mycollection <- TheiaCollection$new(cart.path = cart.path,
dir.path = ".")
print(mycollection)
## Not run:
# Download the tiles in the collection
mycollection$download()
## End(Not run)
## Not run:
# Finally, you can extract zip archives containing the tiles
mycollection$extract(overwrite = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.