Skip to content

Commit

Permalink
Merge pull request #798 from GeoscienceAustralia/AddBarestEarth
Browse files Browse the repository at this point in the history
Begin adding barest earth product
  • Loading branch information
alanstoate authored Jul 30, 2021
2 parents 6c5c96b + 45330af commit 834c07e
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 1 deletion.
17 changes: 16 additions & 1 deletion dev/services/wms/inventory.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@
"swir2"
]
},
{
"product": [
"s2_barest_earth"
],
"styles_count": 7,
"styles_list": [
"simple_rgb",
"green",
"red",
"nir_1",
"nir_2",
"swir_2",
"swir_3"
]
},
{
"product": [
"ls8_barest_earth_albers"
Expand Down Expand Up @@ -1043,5 +1058,5 @@
]
}
],
"total_layers_count": 83
"total_layers_count": 84
}
4 changes: 4 additions & 0 deletions dev/services/wms/ows_refactored/ows_root_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@
"include": "ows_refactored.surface_reflectance.ows_geomedian_cfg.layers",
"type": "python",
},
{
"include": "ows_refactored.surface_reflectance.ows_barest_earth_cfg.layers",
"type": "python",
},
{
"include": "ows_refactored.surface_reflectance.ows_nd_cfg.ls8_be_layers",
"type": "python",
Expand Down
10 changes: 10 additions & 0 deletions dev/services/wms/ows_refactored/surface_reflectance/band_ls_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@
"swir1": ["swir1", "shortwave_infrared_1", "near_shortwave_infrared"],
"swir2": ["swir2", "shortwave_infrared_2", "far_shortwave_infrared"],
}

bands_s2_barest_earth = {
"s2be_red": ["red"],
"s2be_green": ["green"],
"s2be_blue": ["blue"],
"s2be_nir_1": ["nir_1", "near_infrared1"],
"s2be_nir_2": ["nir_2", "near_infrared2"],
"s2be_swir_2": ["swir_2", "shortwave_infrared_1", "near_shortwave_infrared"],
"s2be_swir_3": ["swir_3", "shortwave_infrared_2", "far_shortwave_infrared"],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from ows_refactored.ows_reslim_cfg import reslim_wms_min_zoom_35
from ows_refactored.surface_reflectance.band_ls_cfg import \
bands_s2_barest_earth
from ows_refactored.surface_reflectance.style_ls_cfg import \
styles_s2_barest_earth_list

layers = {
"title": "Barest Earth product name",
"abstract": "",
"layers": [
{
"title": "Surface Reflectance 25m Annual Geomedian (Landsat 8)",
"name": "barest_earth",
"abstract": """
Data is only visible at higher resolutions; when zoomed-out the available area will be displayed
as a shaded region. The surface reflectance geometric median (geomedian) is a pixel composite
mosaic of a time series of earth observations. The value of a pixel in a an annual geomedian
image is the statistical median of all observations for that pixel from a calendar year.
Annual mosaics are available for the following years:
Landsat 8: 2013 to 2017;
For more information, see http://pid.geoscience.gov.au/dataset/ga/120374
For service status information, see https://status.dea.ga.gov.au
""",
"product_name": "s2_barest_earth",
"bands": bands_s2_barest_earth,
# "time_resolution": 'year',
"resource_limits": reslim_wms_min_zoom_35,
"image_processing": {
"extent_mask_func": "datacube_ows.ogc_utils.mask_by_val",
"always_fetch_bands": [],
"manual_merge": False,
},
"wcs": {
"native_crs": "EPSG:3577",
"native_resolution": [25, -25],
"default_bands": ["red", "green", "blue"],
},
"styling": {"default_style": "simple_rgb", "styles": styles_s2_barest_earth_list},
},
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"scale_range": [0.0, 3000.0],
}

style_barest_earth_simple_rgb = style_ls_simple_rgb

style_ls_irg = {
"name": "infrared_green",
"title": "False colour - Green, SWIR, NIR",
Expand Down Expand Up @@ -126,6 +128,8 @@
"scale_range": [0.0, 3000.0],
}

style_barest_earth_pure_blue = style_ls_pure_blue

style_ls_pure_green = {
"name": "green",
"title": "Green - 560",
Expand All @@ -138,6 +142,8 @@
"scale_range": [0.0, 3000.0],
}

style_barest_earth_pure_green = style_ls_pure_green

style_ls_pure_red = {
"name": "red",
"title": "Red - 660",
Expand All @@ -146,6 +152,8 @@
"scale_range": [0.0, 3000.0],
}

style_barest_earth_pure_red = style_ls_pure_red

style_ls_pure_nir = {
"name": "nir",
"title": "Near Infrared (NIR) - 840",
Expand All @@ -154,6 +162,22 @@
"scale_range": [0.0, 3000.0],
}

style_barest_earth_pure_nir_1 = {
"name": "nir_1",
"title": "Near Infrared (NIR) - 840",
"abstract": "Near infra-red band, centered on 840nm",
"components": {"red": {"nir_1": 1.0}, "green": {"nir_1": 1.0}, "blue": {"nir_1": 1.0}},
"scale_range": [0.0, 3000.0],
}

style_barest_earth_pure_nir_2 = {
"name": "nir_2",
"title": "Near Infrared (NIR) - 840",
"abstract": "Near infra-red band, centered on 840nm",
"components": {"red": {"nir_2": 1.0}, "green": {"nir_2": 1.0}, "blue": {"nir_2": 1.0}},
"scale_range": [0.0, 3000.0],
}

style_ls_pure_swir1 = {
"name": "swir1",
"title": "Shortwave Infrared (SWIR) - 1650",
Expand All @@ -177,6 +201,30 @@
"scale_range": [0.0, 3000.0],
}

style_barest_earth_pure_swir_2 = {
"name": "swir_2",
"title": "Shortwave Infrared (SWIR) - 2220",
"abstract": "Short wave infra-red band 2, centered on 2220nm",
"components": {
"red": {"swir_2": 1.0},
"green": {"swir_2": 1.0},
"blue": {"swir_2": 1.0},
},
"scale_range": [0.0, 3000.0],
}

style_barest_earth_pure_swir_3 = {
"name": "swir_3",
"title": "Shortwave Infrared (SWIR) - 2220",
"abstract": "Short wave infra-red band 3, centered on 2220nm",
"components": {
"red": {"swir_3": 1.0},
"green": {"swir_3": 1.0},
"blue": {"swir_3": 1.0},
},
"scale_range": [0.0, 3000.0],
}

style_sentinel_pure_blue = {
"name": "blue",
"title": "Blue - 490",
Expand Down Expand Up @@ -311,6 +359,17 @@
style_ls_pure_swir2,
]


styles_s2_barest_earth_list = [
style_barest_earth_simple_rgb,
style_barest_earth_pure_green,
style_barest_earth_pure_red,
style_barest_earth_pure_nir_1,
style_barest_earth_pure_nir_2,
style_barest_earth_pure_swir_2,
style_barest_earth_pure_swir_3,
]

styles_barest_earth_mosaic_list = [
style_ls_simple_rgb,
style_ls_irg,
Expand Down

0 comments on commit 834c07e

Please sign in to comment.