lsMosaic | R Documentation |
lsMosaic
merges the Landsat-7 or Landsat-8 imagery that covers a
region of interest on the same dates.
lsMosaic( src, AppRoot, region, out.name = "outfile", verbose = FALSE, gutils = TRUE, overwrite = FALSE, ... )
src |
the path to the folder with the Landsat-7 or Landsa-8 images in GTiff format. |
AppRoot |
the directory to save the mosaicked images. |
region |
a |
out.name |
the name of the folder that stores the outputs. By default, “outfile” is assigned. |
verbose |
logical argument. If |
gutils |
logical argument. If |
overwrite |
logical argument. If |
... |
arguments for nested functions:
|
The function mosaics the imagery in the src
folder. The folder can
hold GTiff images from several tiles, dates and bands. When only a subset
of dates has to be mosaicked, the dates should be provided through the
argument dateFilter
. The dates must be provided as a Date
class objects. For further details about the bFilter
argument go
to lsDownload
.Once mosaicked, the images can be cropped to fit
the extent (optional). The extent can be defined in any coordinate reference
system, since lsMosaic
automatically reprojects the extent to match
the projection of the image. The outputs are placed in the AppRoot
directory, under the folder named as out.name
. If no name is provided,
the folder isn named “outfile”. To use 'gutils = TRUE
', a proper installation of ‘GDAL’
and the 'gdalUtils
' library is required. This method is faster than
native ‘R’ functions.
this function does not return anything. It saves the imagery in the
AppRoot
directory.
## Not run: # load a spatial polygon object of Navarre data(ex.navarre) # main output directory wdir <- file.path(tempdir(),"Path_for_downloading_folder") print(wdir) # download Landsat-8 images lsDownSearch(satellite = "ls8", username = "username", password = "password", startDate = as.Date("01-01-2018", "%d-%m-%Y"), endDate = as.Date("20-01-2018", "%d-%m-%Y"), extent = ex.navarre, untar = TRUE, AppRoot = wdir) # folder with the Landsat-8 untared images wdir.ls8 <- file.path(wdir, "Landsat8") tif.src <- file.path(wdir.ls8,"untar") # mosaic the Landsat-8 images lsMosaic(src = tif.src, AppRoot = wdir.ls8, out.name = "Navarre", extent = ex.navarre, gutils = TRUE, # using gdalUtils overwrite = TRUE) # overwrite ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.