diff --git a/R/sits_cube.R b/R/sits_cube.R index 39bec127..e72bd6e3 100755 --- a/R/sits_cube.R +++ b/R/sits_cube.R @@ -217,8 +217,8 @@ #' # --- Access to Digital Earth Australia #' cube_deaustralia <- sits_cube( #' source = "DEAUSTRALIA", -#' collection = "GA_LS8C_NBART_GM_CYEAR_3", -#' bands = c("BLUE", "GREEN", "RED", "NIR", "SWIR1"), +#' collection = "GA_LS8CLS9C_GM_CYEAR_3", +#' bands = c("RED", "GREEN", "BLUE"), #' roi = c( #' lon_min = 137.15991, #' lon_max = 138.18467, diff --git a/inst/extdata/sources/config_source_deaustralia.yml b/inst/extdata/sources/config_source_deaustralia.yml index 881da9c0..6198dac9 100644 --- a/inst/extdata/sources/config_source_deaustralia.yml +++ b/inst/extdata/sources/config_source_deaustralia.yml @@ -403,7 +403,7 @@ sources: ext_tolerance: 0 grid_system : "MGRS" - GA_LS5T_NBART_GM_CYEAR_3 : + GA_LS5T_GM_CYEAR_3 : bands : BLUE : &deaustralia_ls5_geomedian_band_30m missing_value : -999 @@ -413,23 +413,23 @@ sources: offset_value : 0 resampling : "bilinear" resolution : 30 - band_name : "blue" + band_name : "nbart_blue" data_type : "INT2S" GREEN : <<: *deaustralia_ls5_geomedian_band_30m - band_name: "green" + band_name: "nbart_green" RED : <<: *deaustralia_ls5_geomedian_band_30m - band_name: "red" + band_name: "nbart_red" NIR : <<: *deaustralia_ls5_geomedian_band_30m - band_name: "nir" + band_name: "nbart_nir" SWIR1 : <<: *deaustralia_ls5_geomedian_band_30m - band_name: "swir1" + band_name: "nbart_swir_1" SWIR2 : <<: *deaustralia_ls5_geomedian_band_30m - band_name: "swir2" + band_name: "nbart_swir_2" EDEV : &deaustralia_ls5_geomedian_product_30m missing_value : -3.402823466385288e+37 minimum_value : -3.402823466385288e+37 @@ -448,7 +448,7 @@ sources: band_name: "bcdev" satellite : "LANDSAT-5" sensor : "TM-GEOMEDIAN" - collection_name : "ga_ls5t_nbart_gm_cyear_3" + collection_name : "ga_ls5t_gm_cyear_3" access_vars : AWS_DEFAULT_REGION : "ap-southeast-2" AWS_S3_ENDPOINT : "s3.ap-southeast-2.amazonaws.com" @@ -458,7 +458,7 @@ sources: metadata_search : "tile" ext_tolerance : 0 grid_system : "WRS-2" - GA_LS7E_NBART_GM_CYEAR_3 : + GA_LS7E_GM_CYEAR_3 : bands : BLUE : &deaustralia_ls7_geomedian_band_30m missing_value : -999 @@ -468,23 +468,23 @@ sources: offset_value : 0 resampling : "bilinear" resolution : 30 - band_name : "blue" + band_name : "nbart_blue" data_type : "INT2S" GREEN : <<: *deaustralia_ls7_geomedian_band_30m - band_name: "green" + band_name: "nbart_green" RED : <<: *deaustralia_ls7_geomedian_band_30m - band_name: "red" + band_name: "nbart_red" NIR : <<: *deaustralia_ls7_geomedian_band_30m - band_name: "nir" + band_name: "nbart_nir" SWIR1 : <<: *deaustralia_ls7_geomedian_band_30m - band_name: "swir1" + band_name: "nbart_swir_1" SWIR2 : <<: *deaustralia_ls7_geomedian_band_30m - band_name: "swir2" + band_name: "nbart_swir_2" EDEV : &deaustralia_ls7_geomedian_product_30m missing_value : -3.402823466385288e+37 minimum_value : -3.402823466385288e+37 @@ -503,7 +503,7 @@ sources: band_name: "bcdev" satellite : "LANDSAT-7" sensor : "ETM-GEOMEDIAN" - collection_name : "ga_ls7e_nbart_gm_cyear_3" + collection_name : "ga_ls7e_gm_cyear_3" access_vars : AWS_DEFAULT_REGION : "ap-southeast-2" AWS_S3_ENDPOINT : "s3.ap-southeast-2.amazonaws.com" @@ -513,9 +513,9 @@ sources: metadata_search : "tile" ext_tolerance : 0 grid_system : "WRS-2" - GA_LS8C_NBART_GM_CYEAR_3 : + GA_LS8CLS9C_GM_CYEAR_3 : bands : - BLUE : &deaustralia_ls8_geomedian_band_30m + BLUE : &deaustralia_ls89_geomedian_band_30m missing_value : -999 minimum_value : 0 maximum_value : 65536 @@ -523,24 +523,24 @@ sources: offset_value : 0 resampling : "bilinear" resolution : 30 - band_name : "blue" + band_name : "nbart_blue" data_type : "INT2S" GREEN : - <<: *deaustralia_ls8_geomedian_band_30m - band_name: "green" + <<: *deaustralia_ls89_geomedian_band_30m + band_name: "nbart_green" RED : - <<: *deaustralia_ls8_geomedian_band_30m - band_name: "red" + <<: *deaustralia_ls89_geomedian_band_30m + band_name: "nbart_red" NIR : - <<: *deaustralia_ls8_geomedian_band_30m - band_name: "nir" + <<: *deaustralia_ls89_geomedian_band_30m + band_name: "nbart_nir" SWIR1 : - <<: *deaustralia_ls8_geomedian_band_30m - band_name: "swir1" + <<: *deaustralia_ls89_geomedian_band_30m + band_name: "nbart_swir_1" SWIR2 : - <<: *deaustralia_ls8_geomedian_band_30m - band_name: "swir2" - EDEV : &deaustralia_ls8_geomedian_product_30m + <<: *deaustralia_ls89_geomedian_band_30m + band_name: "nbart_swir_2" + EDEV : &deaustralia_ls89_geomedian_product_30m missing_value : -3.402823466385288e+37 minimum_value : -3.402823466385288e+37 maximum_value : 1.7014118346015974e+37 @@ -551,14 +551,14 @@ sources: band_name : "edev" data_type : "FLT4S" SDEV : - <<: *deaustralia_ls8_geomedian_product_30m + <<: *deaustralia_ls89_geomedian_product_30m band_name: "sdev" BCDEV : - <<: *deaustralia_ls8_geomedian_product_30m + <<: *deaustralia_ls89_geomedian_product_30m band_name: "bcdev" - satellite : "LANDSAT-8" + satellite : "LANDSAT-8-9" sensor : "OLI-TIRS-GEOMEDIAN" - collection_name : "ga_ls8c_nbart_gm_cyear_3" + collection_name : "ga_ls8cls9c_gm_cyear_3" access_vars : AWS_DEFAULT_REGION : "ap-southeast-2" AWS_S3_ENDPOINT : "s3.ap-southeast-2.amazonaws.com" diff --git a/man/sits_cube.Rd b/man/sits_cube.Rd index 095fa379..e3661869 100644 --- a/man/sits_cube.Rd +++ b/man/sits_cube.Rd @@ -295,8 +295,8 @@ if (sits_run_examples()) { # --- Access to Digital Earth Australia cube_deaustralia <- sits_cube( source = "DEAUSTRALIA", - collection = "GA_LS8C_NBART_GM_CYEAR_3", - bands = c("BLUE", "GREEN", "RED", "NIR", "SWIR1"), + collection = "GA_LS8CLS9C_GM_CYEAR_3", + bands = c("RED", "GREEN", "BLUE"), roi = c( lon_min = 137.15991, lon_max = 138.18467, diff --git a/tests/testthat/test-cube-deaustralia.R b/tests/testthat/test-cube-deaustralia.R index e4ccb118..d9ff2944 100644 --- a/tests/testthat/test-cube-deaustralia.R +++ b/tests/testthat/test-cube-deaustralia.R @@ -33,12 +33,12 @@ test_that("Creating GA_LS5T_ARD_3 cubes from DEAustralia", { cube_nrows <- .tile_nrows(landsat_cube) expect_true(.raster_nrows(r_obj) == cube_nrows) }) -test_that("Creating GA_LS5T_NBART_GM_CYEAR_3 cubes from DEAustralia", { +test_that("Creating GA_LS5T_GM_CYEAR_3 cubes from DEAustralia", { landsat_cube <- .try( { sits_cube( source = "DEAUSTRALIA", - collection = "GA_LS5T_NBART_GM_CYEAR_3", + collection = "GA_LS5T_GM_CYEAR_3", bands = c("SWIR1"), roi = c( lon_min = 137.15991, @@ -104,12 +104,12 @@ test_that("Creating GA_LS7E_ARD_3 cubes from DEAustralia", { cube_nrows <- .tile_nrows(landsat_cube) expect_true(.raster_nrows(r_obj) == cube_nrows) }) -test_that("Creating GA_LS7E_NBART_GM_CYEAR_3 cubes from DEAustralia", { +test_that("Creating GA_LS7E_GM_CYEAR_3 cubes from DEAustralia", { landsat_cube <- .try( { sits_cube( source = "DEAUSTRALIA", - collection = "GA_LS7E_NBART_GM_CYEAR_3", + collection = "GA_LS7E_GM_CYEAR_3", bands = c("SWIR1"), roi = c( lon_min = 137.15991, @@ -175,21 +175,22 @@ test_that("Creating GA_LS8C_ARD_3 cubes from DEAustralia", { cube_nrows <- .tile_nrows(landsat_cube) expect_true(.raster_nrows(r_obj) == cube_nrows) }) -test_that("Creating GA_LS8C_NBART_GM_CYEAR_3 cubes from DEAustralia", { + +test_that("Creating GA_LS9C_ARD_3 cubes from DEAustralia", { landsat_cube <- .try( { sits_cube( source = "DEAUSTRALIA", - collection = "GA_LS8C_NBART_GM_CYEAR_3", - bands = c("SWIR1"), + collection = "GA_LS9C_ARD_3", + bands = c("NIR", "CLOUD"), roi = c( lon_min = 137.15991, lon_max = 138.18467, lat_min = -33.85777, lat_max = -32.56690 ), - start_date = "2016-01-01", - end_date = "2017-01-01", + start_date = "2023-01-01", + end_date = "2024-01-01", progress = FALSE ) }, @@ -200,8 +201,8 @@ test_that("Creating GA_LS8C_NBART_GM_CYEAR_3 cubes from DEAustralia", { message = "DEAustralia is not accessible" ) - expect_true(all(sits_bands(landsat_cube) %in% c("SWIR1"))) - expect_equal(nrow(landsat_cube), 5) + expect_true(all(sits_bands(landsat_cube) %in% c("NIR", "CLOUD"))) + expect_equal(nrow(landsat_cube), 8) bbox_cube <- sits_bbox(landsat_cube, as_crs = "EPSG:4326") bbox_cube_1 <- sits_bbox(.tile(landsat_cube), as_crs = "EPSG:4326") expect_true(bbox_cube["xmax"] >= bbox_cube_1["xmax"]) @@ -211,21 +212,21 @@ test_that("Creating GA_LS8C_NBART_GM_CYEAR_3 cubes from DEAustralia", { expect_true(.raster_nrows(r_obj) == cube_nrows) }) -test_that("Creating GA_LS9C_ARD_3 cubes from DEAustralia", { +test_that("Creating GA_LS8CLS9C_GM_CYEAR_3 cubes from DEAustralia", { landsat_cube <- .try( { sits_cube( source = "DEAUSTRALIA", - collection = "GA_LS9C_ARD_3", - bands = c("NIR", "CLOUD"), + collection = "GA_LS8CLS9C_GM_CYEAR_3", + bands = c("SWIR1"), roi = c( lon_min = 137.15991, lon_max = 138.18467, lat_min = -33.85777, lat_max = -32.56690 ), - start_date = "2023-01-01", - end_date = "2024-01-01", + start_date = "2016-01-01", + end_date = "2017-01-01", progress = FALSE ) }, @@ -236,8 +237,8 @@ test_that("Creating GA_LS9C_ARD_3 cubes from DEAustralia", { message = "DEAustralia is not accessible" ) - expect_true(all(sits_bands(landsat_cube) %in% c("NIR", "CLOUD"))) - expect_equal(nrow(landsat_cube), 8) + expect_true(all(sits_bands(landsat_cube) %in% c("SWIR1"))) + expect_equal(nrow(landsat_cube), 5) bbox_cube <- sits_bbox(landsat_cube, as_crs = "EPSG:4326") bbox_cube_1 <- sits_bbox(.tile(landsat_cube), as_crs = "EPSG:4326") expect_true(bbox_cube["xmax"] >= bbox_cube_1["xmax"])