# estimated relative growth size of R memory relative to block size
R_memory_bloat          : 4
R_processing_bloat      : 5

# number of items returned by stac service
rstac_pagination_limit  : 1000

# default raster package
R_raster_pkg            : "terra"

# GDAL GTiff default creation options
GTiff_default_options   : ["COMPRESS=LZW", "BIGTIFF=YES"]

sources:
    CLASSIFIED              :
        s3_class            : ["classified_image"]
        collections         :
            CLASSIFIED      :
                bands       :
                    CLASS   :
                        missing_value : 255
                        minimum_value : 1
                        maximum_value : 254
                        scale_factor  : 1
                        offset_value  : 0
                        resampling    : "ngb"
                        band_name     : "CLASS"
                        creation_type : "INT1U"
    PROBS                   :
        s3_class            : ["probs_cube"]
        collections         :
            PROBS           :
                bands       :
                    PROBS   :
                        missing_value : -9999
                        minimum_value : 0
                        maximum_value : 10000
                        scale_factor  : 0.0001
                        offset_value  : 0
                        resampling    : "bilinear"
                        band_name     : "PROBS"
                        creation_type : "INT2S"
                    NOBS    :
                        missing_value : 255
                        minimum_value : 0
                        maximum_value : 254
                        scale_factor  : 1
                        offset_value  : 0
                        resampling    : "ngb"
                        band_name     : "NOBS"
                        creation_type : "INT1U"
    BDC                     :
        s3_class            : ["bdc_cube", "stac_cube", "raster_cube"]
        service             : "STAC"
        url                 : "https://brazildatacube.dpi.inpe.br/stac/"
        collections         :
            CB4_64-1        : &bdc_cb4
                bands       :
                    NDVI    : &bdc_awfi_ndvi
                        missing_value : -9999
                        minimum_value : -10000
                        maximum_value : 10000
                        scale_factor  : 0.0001
                        offset_value  : 0
                        resampling    : "bilinear"
                        resolutions   : [64]
                        band_name     : "NDVI"
                    EVI     :
                        <<: *bdc_awfi_ndvi
                        band_name     : "EVI"
                    B13     : &bdc_awfi_b13
                        missing_value : -9999
                        minimum_value : 0
                        maximum_value : 10000
                        scale_factor  : 0.0001
                        offset_value  : 0
                        resampling    : "bilinear"
                        resolutions   : [64]
                        band_name     : "BAND13"
                    B14     :
                        <<: *bdc_awfi_b13
                        band_name     : "BAND14"
                    B15     :
                        <<: *bdc_awfi_b13
                        band_name     : "BAND15"
                    B16     :
                        <<: *bdc_awfi_b13
                        band_name     : "BAND16"
                    CLOUD   : &bdc_awfi_cloud
                        bit_mask      : FALSE
                        band_name     : "CMASK"
                        values        :
                            0         : "No Data"
                            127       : "Clear Pixel"
                            255       : "Cloud"
                        interp_values : [0, 255]
                        resampling    : "ngb"
                        resolutions   : [64]
            CB4_64_16D_STK-1: *bdc_cb4
            CB4MUX_20-1     : &bdc_cb4_mux
                bands       :
                    NDVI    : &bdc_mux_ndvi
                        missing_value : -9999
                        minimum_value : -10000
                        maximum_value : 10000
                        scale_factor  : 0.0001
                        offset_value  : 0
                        resampling    : "bilinear"
                        resolutions   : [20]
                        band_name     : "NDVI"
                    EVI     :
                        <<: *bdc_mux_ndvi
                        band_name      : "EVI"
                    B5      : &bdc_mux_b5
                        missing_value : -9999
                        minimum_value : 0
                        maximum_value : 10000
                        scale_factor  : 0.0001
                        offset_value  : 0
                        resampling    : "bilinear"
                        resolutions   : [20]
                        band_name     : "BAND5"
                    B6      :
                        <<: *bdc_mux_b5
                        band_name     : "BAND6"
                    B7      :
                        <<: *bdc_mux_b5
                        band_name     : "BAND7"
                    B8      :
                        <<: *bdc_mux_b5
                        band_name     : "BAND8"
                    CLOUD   : &bdc_mux_cloud
                        bit_mask      : FALSE
                        band_name     : "CMASK"
                        values        :
                            0         : "No Data"
                            127       : "Clear Pixel"
                            255       : "Cloud"
                        interp_values : [0, 255]
                        resampling    : "ngb"
                        resolutions   : [20]
            CB4_20_1M_STK-1 :  &bdc_cb4_mux_stk
                bands:
                    NDVI    : *bdc_mux_ndvi
                    EVI     :
                        <<: *bdc_mux_ndvi
                        band_name     : "EVI"
                    B5      : *bdc_mux_b5
                    B6      :
                        <<: *bdc_mux_b5
                        band_name     : "BAND6"
                    B7      :
                        <<: *bdc_mux_b5
                        band_name     : "BAND7"
                    B8      :
                        <<: *bdc_mux_b5
                        band_name     : "BAND8"
                    CLOUD   :
                        <<: *bdc_mux_cloud
                        band_name     : "MASK"
            LC8_30-1        : &bdc_lc8
                bands       :
                    NDVI    : &bdc_oli_ndvi
                        missing_value : -9999
                        minimum_value : -3000
                        maximum_value : 10000
                        scale_factor  : 0.0001
                        offset_value  : 0
                        resampling    : "bilinear"
                        resolutions   : [30]
                        band_name     : "NDVI"
                    EVI     :
                        <<: *bdc_oli_ndvi
                        band_name     : "EVI"
                    B1      : &bdc_oli_band1
                        missing_value : -9999
                        minimum_value : 0
                        maximum_value : 10000
                        scale_factor  : 0.0001
                        offset_value  : 0
                        resampling    : "bilinear"
                        resolutions   : [30]
                        band_name     : "BAND1"
                    B2      :
                        <<: *bdc_oli_band1
                        band_name     : "BAND2"
                    B3      :
                        <<: *bdc_oli_band1
                        band_name     : "BAND3"
                    B4      :
                        <<: *bdc_oli_band1
                        band_name     : "BAND4"
                    B5      :
                        <<: *bdc_oli_band1
                        band_name     : "BAND5"
                    B6      :
                        <<: *bdc_oli_band1
                        band_name     : "BAND6"
                    B7      :
                        <<: *bdc_oli_band1
                        band_name     : "BAND7"
                    CLOUD   : &bdc_oli_cloud
                        bit_mask      : FALSE
                        band_name     : "Fmask4"
                        values        :
                            0         : "Clear Land"
                            1         : "Clear Water"
                            2         : "Cloud Shadow"
                            3         : "Snow"
                            4         : "Cloud"
                            255       : "No Data"
                        interp_values : [2, 3, 4, 255]
                        resampling    : "ngb"
                        resolutions   : [30]
            LC8_30_16D_STK-1: *bdc_lc8
            MOD13Q1-6       : &bdc_mod
                bands       :
                    NDVI              : &bdc_modis_ndvi
                        missing_value : -3000
                        minimum_value : -2000
                        maximum_value : 10000
                        scale_factor  : 0.0001
                        offset_value  : 0
                        resampling    : "bilinear"
                        resolutions   : [231.656]
                        band_name     : "NDVI"
                    EVI     :
                        <<: *bdc_modis_ndvi
                        band_name     : "EVI"
                    blue    : &bdc_modis_blue
                        missing_value : -1000
                        minimum_value : 0
                        maximum_value : 10000
                        scale_factor  : 0.0001
                        offset_value  : 0
                        resampling    : "bilinear"
                        resolutions   : [231.656]
                        band_name     : "blue_reflectance"
                    red     :
                        <<: *bdc_modis_blue
                        band_name     : "red_reflectance"
                    nir     :
                        <<: *bdc_modis_blue
                        band_name     : "NIR_reflectance"
                    mir     :
                        <<: *bdc_modis_blue
                        band_name     : "MIR_reflectance"
                    CLOUD   : &bdc_modis_cloud
                        bit_mask      : FALSE
                        band_name     : "pixel_reliability"
                        values        :
                            0         : "Use with confidence"
                            1         : "Useful, but look at other QA information"
                            2         : "Target covered with snow/ice"
                            3         : "Target not visible, covered with cloud"
                            255       : "Fill/No Data-Not Processed"
                        interp_values : [2, 3, 255]
                        resampling    : "ngb"
                        resolutions   : [231.656]
            MYD13Q1-6       : *bdc_mod
            S2_10-1         : &bdc_s2
                bands       :
                    NDVI    : &bdc_msi_ndvi
                        missing_value : -9999
                        minimum_value : -9999
                        maximum_value : 10000
                        scale_factor  : 0.0001
                        offset_value  : 0
                        resampling    : "bilinear"
                        resolutions   : [10]
                        band_name     : "NDVI"
                    EVI     :
                        <<: *bdc_msi_ndvi
                        band_name     : "EVI"
                    B01     : &bdc_msi_band1
                        missing_value : -9999
                        minimum_value : 0
                        maximum_value : 10000
                        scale_factor  : 0.0001
                        offset_value  : 0
                        resampling    : "bilinear"
                        resolutions   : [10]
                        band_name     : "band1"
                    B02     :
                        <<: *bdc_msi_band1
                        band_name     : "band2"
                    B03     :
                        <<: *bdc_msi_band1
                        band_name     : "band3"
                    B04     :
                        <<: *bdc_msi_band1
                        band_name     : "band4"
                    B05     :
                        <<: *bdc_msi_band1
                        band_name     : "band5"
                    B06     :
                        <<: *bdc_msi_band1
                        band_name     : "band6"
                    B07     :
                        <<: *bdc_msi_band1
                        band_name     : "band7"
                    B08     :
                        <<: *bdc_msi_band1
                        band_name     : "band8"
                    B8A     :
                        <<: *bdc_msi_band1
                        band_name     : "band8a"
                    B09     :
                        <<: *bdc_msi_band1
                        band_name     : "band9"
                    B10     :
                        <<: *bdc_msi_band1
                        band_name     : "band10"
                    B11     :
                        <<: *bdc_msi_band1
                        band_name     : "band11"
                    B12     :
                        <<: *bdc_msi_band1
                        band_name     : "band12"
                    CLOUD   :
                        bit_mask      : FALSE
                        band_name     : "Fmask4"
                        values        :
                            0         : "clear land pixel"
                            1         : "clear water pixel"
                            2         : "cloud shadow"
                            3         : "snow"
                            4         : "cloud"
                            255       : "no observation"
                        interp_values : [2, 3, 4, 255]
                        resampling    : "ngb"
                        resolutions   : [10]
            S2_10_16D_STK-1 : *bdc_s2
    WTSS                    :
        s3_class            : ["wtss_cube"]
        service             : "WTSS"
        url                 : "https://brazildatacube.dpi.inpe.br/wtss/"
        collections         :
            MOD13Q1-6       : *bdc_mod
            MYD13Q1-6       : *bdc_mod
            S2_10_16D_STK-1 : *bdc_s2
            S2_10-1         : *bdc_s2
            LC8_30-1        : *bdc_lc8
            LC8_30_16D_STK-1: *bdc_lc8
            CB4_20_1M_STK-1 : *bdc_cb4_mux
            CB4_64_16D_STK-1: *bdc_cb4
            CB4_64-1        : *bdc_cb4
    SATVEG                  :
        s3_class            : ["satveg_cube"]
        service             : "SATVEG"
        url                 : "https://www.satveg.cnptia.embrapa.br/satvegws/ws/perfil/ZW46IXzr4pRzJlX/"
        url_test            : "https://www.satveg.cnptia.embrapa.br/satvegws/ws/perfil/ZW46IXzr4pRzJlX/ndvi/ponto/-55.50563/-11.71557/terra/1//"
        collections         :
            terra           : &satveg_terra
                bbox        :
                    xmin    : -81.2341
                    xmax    : -31.9165
                    ymin    : -30.0000
                    ymax    : 10.0000
                size        :
                    nrows   : 24000
                    ncols   : 19200
                prefilter   : "3" # "0" - none, "1" - no data correction, "2" - cloud correction, "3" - no data and cloud correction
                crs         : "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
                bands       :
                    NDVI    :
                        <<: *bdc_modis_ndvi
                        band_name: "NDVI"
                    EVI     :
                        <<: *bdc_modis_ndvi
                        band_name: "EVI"
            aqua            : *satveg_terra
            comb            : *satveg_terra
    AWS                     :
        s3_class            : ["aws_cube", "stac_cube", "raster_cube"]
        service             : "STAC"
        url                 : "https://earth-search.aws.element84.com/v0/"
        collections         :
            sentinel-s2-l2a :
                bands       :
                    B01     : &aws_msi_60m
                        missing_value: -9999
                        minimum_value: 0
                        maximum_value: 10000
                        scale_factor : 0.0001
                        offset_value : 0
                        resampling   : "bilinear"
                        resolutions  : [60]
                        band_name    : "B01"
                    B02     : &aws_msi_10m
                        missing_value: -9999
                        minimum_value: 0
                        maximum_value: 10000
                        scale_factor : 0.0001
                        offset_value : 0
                        resampling   : "bilinear"
                        resolutions  : [10, 20, 60]
                        band_name    : "B02"
                    B03     :
                        <<: *aws_msi_10m
                        band_name    : "B03"
                    B04     :
                        <<: *aws_msi_10m
                        band_name    : "B04"
                    B05     : &aws_msi_20m
                        missing_value: -9999
                        minimum_value: 0
                        maximum_value: 10000
                        scale_factor : 0.0001
                        offset_value : 0
                        resampling   : "bilinear"
                        resolutions  : [20, 60]
                        band_name    : "B05"
                    B06     :
                        <<: *aws_msi_20m
                        band_name    : "B06"
                    B07     :
                        <<: *aws_msi_20m
                        band_name    : "B07"
                    B08     :
                        <<: *aws_msi_10m
                        band_name    : "B08"
                    B8A     :
                        <<: *aws_msi_20m
                        band_name    : "B8A"
                    B09     :
                        <<: *aws_msi_60m
                        band_name    : "B09"
                    B11     :
                        <<: *aws_msi_20m
                        band_name    : "B11"
                    B12     :
                        <<: *aws_msi_20m
                        band_name    : "B12"
                    CLOUD   :
                        bit_mask     : FALSE
                        band_name    : "SCL"
                        values       :
                            0        : "missing_data"
                            1        : "defective pixel"
                            2        : "shadows"
                            3        : "cloud shadows"
                            4        : "vegetation"
                            5        : "non-vegetated"
                            6        : "water"
                            7        : "unclassified"
                            8        : "cloud medium"
                            9        : "cloud high"
                            10       : "thin cirrus"
                            11       : "snow or ice"
                        interp_values: [0, 1, 2, 3, 8, 9, 10, 11]
                        resampling   : "ngb"
                        resolutions  : [20, 60]
                AWS         :
                    AWS_DEFAULT_REGION   : "eu-central-1"
                    AWS_S3_ENDPOINT      : "s3.amazonaws.com"
                    AWS_REQUEST_PAYER    : "requester"
    DEAFRICA                :
        s3_class            : ["deafrica_cube", "stac_cube", "raster_cube"]
        service             : "STAC"
        url                 : "https://explorer.digitalearth.africa/stac/"
        collections         :
            ga_s2_gm        : &deafrica_s2
                bands       :
                    B01     : &deafrica_msi_60m
                        missing_value : -9999
                        minimum_value : 0
                        maximum_value : 10000
                        scale_factor  : 0.0001
                        offset_value  : 0
                        resampling    : "bilinear"
                        resolutions   : [60]
                        band_name     : "B01"
                    B02     : &deafrica_msi_10m
                        missing_value : -9999
                        minimum_value : 0
                        maximum_value : 10000
                        scale_factor  : 0.0001
                        offset_value  : 0
                        resampling    : "bilinear"
                        resolutions   : [10]
                        band_name     : "B02"
                    B03     :
                        <<: *deafrica_msi_10m
                        band_name     : "B03"
                    B04     :
                        <<: *deafrica_msi_10m
                        band_name     : "B04"
                    B05     : &deafrica_msi_20m
                        missing_value : -9999
                        minimum_value : 0
                        maximum_value : 10000
                        scale_factor  : 0.0001
                        offset_value  : 0
                        resampling    : "bilinear"
                        resolutions   : [20]
                        band_name     : "B05"
                    B06     :
                        <<: *deafrica_msi_20m
                        band_name     : "B06"
                    B07     :
                        <<: *deafrica_msi_20m
                        band_name     : "B07"
                    B08     :
                        <<: *deafrica_msi_10m
                        band_name     : "B08"
                    B8A     :
                        <<: *deafrica_msi_20m
                        band_name     : "B8A"
                    B09     :
                        <<: *deafrica_msi_60m
                        band_name     : "B09"
                    B11     :
                        <<: *deafrica_msi_20m
                        band_name     : "B11"
                    B12     :
                        <<: *deafrica_msi_20m
                        band_name     : "B12"
                    CLOUD   :
                        bit_mask      : FALSE
                        band_name     : "SCL"
                        values        :
                            0         : "missing_data"
                            1         : "defective pixel"
                            2         : "shadows"
                            3         : "cloud shadows"
                            4         : "vegetation"
                            5         : "non-vegetated"
                            6         : "water"
                            7         : "unclassified"
                            8         : "cloud medium"
                            9         : "cloud high"
                            10        : "thin cirrus"
                            11        : "snow or ice"
                        interp_values : [0, 1, 2, 3, 8, 9, 10, 11]
                        resampling    : "ngb"
                        resolutions   : [20]
                AWS         :
                    AWS_DEFAULT_REGION: "af-south-1"
                    AWS_S3_ENDPOINT   : "s3.af-south-1.amazonaws.com"
                    AWS_REQUEST_PAYER : "requester"
            s2_l2a          :
                <<: *deafrica_s2
    LOCAL                   :
        s3_class            : ["local_cube", "raster_cube"]
        file_extensions     : ["tiff", "tif", "jp2", "hdf", "vrt"]
        collections         :
            LANDSAT-8/OLI   : *bdc_lc8
            LANDSAT-7/ETM   : *bdc_lc8
            LANDSAT-5/TM    : *bdc_lc8
            SENTINEL-2/MSI  : *bdc_s2
            TERRA/MODIS     : *bdc_mod
            AQUA/MODIS      : *bdc_mod
            CBERS-4/AWFI    : *bdc_cb4
            CBERS-4/MUX     : *bdc_cb4_mux

palettes:
    default:
        Araguaia          : "mediumaquamarine"
        Beans             : "lightskyblue3"
        Campo_Cerrado     : "darkseagreen3"
        Cerradao          : "olivedrab"
        Cerrado           : "yellowgreen"
        Cerrado_Rupestre  : "palegreen"
        Corn              : "burlywood3"
        Cotton            : "wheat2"
        Cropland          : "orange4"
        Dunas             : "honeydew3"
        Deforestation     : "darkred"
        Dense_Tree_Savanna: "forestgreen"
        Fallow_Cotton     : "wheat2"
        Millet_Cotton     : "wheat4"
        Forest            : "darkgreen"
        Planted Forest    : "mediumseagreen"
        Pasture           : "khaki"
        NatNonVegetated   : "honeydew3"
        NonForest         : "lightsteelblue2"
        Savanna           : "springgreen"
        Shrublands        : "palegreen"
        Soy_Corn          : "orange2"
        Soy_Cotton        : "orangered4"
        Soy_Fallow        : "orange4"
        Soy_Sorghum       : "darkorange3"
        Soy_Millet        : "darkorange"
        Soy_Sunflower     : "darkorange4"
        Sugarcane         : "gold4"
        Urban_Area        : "ivory4"
        Water             : "royalblue3"
        Wetlands          : "mediumaquamarine"
