process_blackmarble: Assign VIIRS Black Marble products corner coordinates to...

View source: R/process.R

process_blackmarbleR Documentation

Assign VIIRS Black Marble products corner coordinates to retrieve a merged raster

Description

This function will return a SpatRaster object with georeferenced h5 files of Black Marble product. Referencing corner coordinates are necessary as the original h5 data do not include such information.

Usage

process_blackmarble(
  path = NULL,
  date = NULL,
  tile_df = process_blackmarble_corners(),
  subdataset = 3L,
  crs = "EPSG:4326",
  ...
)

Arguments

path

character. Full paths of h5 files.

date

character(1). Date to query.

tile_df

data.frame. Contains four corner coordinates in fields named c("xmin", "xmax", "ymin", "ymax"). See process_blackmarble_corners to generate a valid object for this argument.

subdataset

integer(1). Subdataset number to process. Default is 3L.

crs

character(1). terra::crs compatible CRS. Default is "EPSG:4326"

...

For internal use.

Value

a SpatRaster object

Author(s)

Insang Song

References

See Also

  • terra::describe

  • terra::merge

  • process_blackmarble_corners

Examples

## NOTE: Example is wrapped in `\dontrun{}` as function requires a large
##       amount of data which is not included in the package.
## Not run: 
vnp46a2 <- process_blackmarble(
  path =
    list.files("./data", pattern = "VNP46A2.", full.names = TRUE),
  date = "2024-01-01",
  tile_df =
    process_blackmarble_corners(hrange = c(8, 10), vrange = c(4, 5)),
  subdataset = 3L,
  crs = "EPSG:4326"
)

## End(Not run)

amadeus documentation built on April 4, 2025, 12:21 a.m.