Skip to content

Commit 2f864b8

Browse files
Merge pull request #1468 from Pedrobrito99/add-new-collections
Add support for Amazonia-1 and GLAD image collections in BDC
2 parents 73c0c18 + 92bfb20 commit 2f864b8

4 files changed

Lines changed: 608 additions & 254 deletions

File tree

NAMESPACE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ S3method(.source_items_new,ogh_cube)
204204
S3method(.source_items_new,sdc_cube)
205205
S3method(.source_items_new,usgs_cube)
206206
S3method(.source_items_tile,"aws_cube_landsat-c2-l2")
207+
S3method(.source_items_tile,"bdc_cube_amazonia-1")
208+
S3method(.source_items_tile,"bdc_cube_landsat-1y")
209+
S3method(.source_items_tile,"bdc_cube_landsat-2m")
207210
S3method(.source_items_tile,"cdse_os_cube_sentinel-1-rtc")
208211
S3method(.source_items_tile,"deafrica_cube_rainfall-chirps-daily")
209212
S3method(.source_items_tile,"deafrica_cube_rainfall-chirps-monthly")

R/api_source_bdc.R

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,31 @@
8484
}
8585
return(invisible(source))
8686
}
87+
#' @keywords internal
88+
#' @noRd
89+
#' @export
90+
`.source_items_tile.bdc_cube_amazonia-1` <- function(source, ...,
91+
items,
92+
collection = NULL) {
93+
paste0("NoTilingSystem-", seq_len(rstac::items_length(items)))
94+
}
95+
#' @keywords internal
96+
#' @noRd
97+
#' @export
98+
`.source_items_tile.bdc_cube_landsat-2m` <- function(source, ...,
99+
items,
100+
collection = NULL) {
101+
id <- rstac::items_reap(items = items, field = "id")
102+
parts <- stringr::str_split(id, "_")[[1]][2:3]
103+
stringr::str_c(parts, collapse = "")
104+
}
105+
#' @keywords internal
106+
#' @noRd
107+
#' @export
108+
`.source_items_tile.bdc_cube_landsat-1y` <- function(source, ...,
109+
items,
110+
collection = NULL) {
111+
id <- rstac::items_reap(items = items, field = "id")
112+
parts <- stringr::str_split(id, "_")[[1]][2:3]
113+
stringr::str_c(parts, collapse = "")
114+
}

inst/extdata/sources/config_source_bdc.yml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,3 +388,129 @@ sources:
388388
ext_tolerance: 0.01
389389
grid_system : "BDC-Small V2"
390390
dates: "2017 to 2024"
391+
AMAZONIA-1 :
392+
bands :
393+
B01 : &amz1_wfi_64m
394+
missing_value : -9999
395+
minimum_value : 0
396+
maximum_value : 10000
397+
scale_factor : 0.0001
398+
offset_value : 0
399+
resolution : 64
400+
band_name : "BAND1"
401+
data_type : "INT2S"
402+
B02 :
403+
<<: *amz1_wfi_64m
404+
band_name : "BAND2"
405+
B03 :
406+
<<: *amz1_wfi_64m
407+
band_name : "BAND3"
408+
B04 :
409+
<<: *amz1_wfi_64m
410+
band_name : "BAND4"
411+
CLOUD :
412+
bit_mask: false
413+
band_name : "CMASK"
414+
values :
415+
0: "No Data"
416+
127: "Clear Pixel"
417+
255: "Cloud"
418+
interp_values: [0, 255]
419+
resolution: 64
420+
data_type: "INT1U"
421+
satellite : "AMAZONIA-1"
422+
sensor : "WFI"
423+
platforms :
424+
AMAZONIA-1: "amazonia-1"
425+
collection_name: "AMZ1-WFI-L4-SR-1"
426+
token_vars : ["BDC_ACCESS_KEY"]
427+
open_data : true
428+
open_data_token: false
429+
metadata_search: "feature"
430+
ext_tolerance: 0
431+
grid_system : "NoTilingSystem"
432+
dates: "2024 to now"
433+
LANDSAT-2M :
434+
bands :
435+
BLUE : &bdc_tsirf_band
436+
missing_value : 0
437+
minimum_value : 1
438+
maximum_value : 255
439+
scale_factor : 1
440+
offset_value : 0
441+
resolution : 30
442+
band_name : "blue"
443+
data_type : "INT1U"
444+
GREEN :
445+
<<: *bdc_tsirf_band
446+
band_name : "green"
447+
RED :
448+
<<: *bdc_tsirf_band
449+
band_name : "red"
450+
NIR :
451+
<<: *bdc_tsirf_band
452+
band_name : "nir"
453+
SWIR1 :
454+
<<: *bdc_tsirf_band
455+
band_name : "swir1"
456+
SWIR2 :
457+
<<: *bdc_tsirf_band
458+
band_name : "swir2"
459+
THERMAL :
460+
<<: *bdc_tsirf_band
461+
band_name : "thermal"
462+
satellite : "LANDSAT"
463+
sensor : "TM-ETM-OLI-TIRS"
464+
platforms :
465+
LANDSAT-4: "landsat-4"
466+
LANDSAT-5: "landsat-5"
467+
LANDSAT-7: "landsat-7"
468+
LANDSAT-8: "landsat-8"
469+
LANDSAT-9: "landsat-9"
470+
collection_name: "landsat-tsirf-bimonthly-1"
471+
token_vars : ["BDC_ACCESS_KEY"]
472+
open_data : true
473+
open_data_token: false
474+
metadata_search: "feature"
475+
ext_tolerance: 0
476+
grid_system : "GLAD_ARD_GTS"
477+
dates: "1997 to 2024"
478+
LANDSAT-1Y :
479+
bands :
480+
BLUE :
481+
<<: *bdc_tsirf_band
482+
band_name : "blue"
483+
GREEN :
484+
<<: *bdc_tsirf_band
485+
band_name : "green"
486+
RED :
487+
<<: *bdc_tsirf_band
488+
band_name : "red"
489+
NIR :
490+
<<: *bdc_tsirf_band
491+
band_name : "nir"
492+
SWIR1 :
493+
<<: *bdc_tsirf_band
494+
band_name : "swir1"
495+
SWIR2 :
496+
<<: *bdc_tsirf_band
497+
band_name : "swir2"
498+
THERMAL :
499+
<<: *bdc_tsirf_band
500+
band_name : "thermal"
501+
satellite : "LANDSAT"
502+
sensor : "TM-ETM-OLI-TIRS"
503+
platforms :
504+
LANDSAT-4: "landsat-4"
505+
LANDSAT-5: "landsat-5"
506+
LANDSAT-7: "landsat-7"
507+
LANDSAT-8: "landsat-8"
508+
LANDSAT-9: "landsat-9"
509+
collection_name: "landsat-tsirf-yearly-1"
510+
token_vars : ["BDC_ACCESS_KEY"]
511+
open_data : true
512+
open_data_token: false
513+
metadata_search: "feature"
514+
ext_tolerance: 0
515+
grid_system : "GLAD_ARD_GTS"
516+
dates: "1997 to 2024"

0 commit comments

Comments
 (0)