Skip to content

Commit

Permalink
Proof-of-concept combined landsat-sentinel-2 layer. (#1134)
Browse files Browse the repository at this point in the history
* Proof-of-concept combined landsat-sentinel-2 layer.  Visible bands only, no masking.

* flake8 and isort fixes.

* More flake8/isort fixes.

* I'm confused what flake8 wants here....

* Update total layer count in inventory.

* Update dev/services/wms/ows_refactored/baseline_satellite_data/landsat_s2_combined/ows_c3_cfg.py

Co-authored-by: Robbi Bishop-Taylor <[email protected]>

* Update dev/services/wms/ows_refactored/baseline_satellite_data/landsat_s2_combined/ows_c3_cfg.py

Co-authored-by: Robbi Bishop-Taylor <[email protected]>

Co-authored-by: Robbi Bishop-Taylor <[email protected]>
  • Loading branch information
SpacemanPaul and robbibt authored Jan 24, 2023
1 parent 9feba17 commit 16ad4d1
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 1 deletion.
20 changes: 19 additions & 1 deletion dev/services/wms/inventory.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
{
"total_layers_count": 68,
"total_layers_count": 69,
"layers": [
{
"layer": "s2_ls_combined",
"product": [
"ga_s2am_ard_3",
"ga_s2bm_ard_3",
"ga_ls5t_ard_3",
"ga_ls7e_ard_3",
"ga_ls8c_ard_3",
"ga_ls9c_ard_3"
],
"styles_count": 4,
"styles_list": [
"true_colour",
"blue",
"green",
"red"
]
},
{
"layer": "ga_ls_ard_3",
"product": [
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
from ows_refactored.baseline_satellite_data.landsat_s2_combined.style_combined_cfg import \
styles_combined
from ows_refactored.ows_reslim_cfg import reslim_for_sentinel2

# bands definition
bands_ls_s2_shared = {
"nbart_blue": ["nbart_blue", "blue"],
"nbart_green": ["nbart_green", "green"],
"nbart_red": ["nbart_red", "red"],
}

combined_layer = {
"title": "DEA Surface Reflectance (Landsat and Sentinel-2)",
"name": "s2_ls_combined",
"abstract": """Geoscience Australia Landsat and Sentinel-2 Analysis Ready Data Collection 3
This product takes Sentinel-2 and Landsat imagery captured over the Australian continent and corrects for inconsistencies across land and coastal fringes. The result is accurate and standardised surface reflectance data, which is instrumental in identifying and quantifying environmental change.
Where Sentinel-2 and Landsat data are both available, the higher resolution
Sentinel-2 data is used.
This product combines:
* Sentinel-2A/Sentinel-2B
* Landsat-5/Landsat-7/Landsat-8/Landsat-9
For service status information, see https://status.dea.ga.gov.au""",
"multi_product": True,
"product_names": [
# Sentinel-2 listed first to set priority on overlap areas.
"ga_s2am_ard_3",
"ga_s2bm_ard_3",
# Landsat listed second.
"ga_ls5t_ard_3",
"ga_ls7e_ard_3",
"ga_ls8c_ard_3",
"ga_ls9c_ard_3",
],
"bands": bands_ls_s2_shared,
"resource_limits": reslim_for_sentinel2,
"dynamic": True,
"native_crs": "EPSG:3577",
"native_resolution": [10, -10],
"image_processing": {
"extent_mask_func": "datacube_ows.ogc_utils.mask_by_val",
"always_fetch_bands": [],
"manual_merge": False,
},
"styling": {
"default_style": "true_colour",
"styles": styles_combined
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
style_combined_true_colour = {
"name": "true_colour",
"title": "True Colour",
"abstract": "True-colour image, using the red, green and blue bands",
"components": {
"red": {"nbart_red": 1.0},
"green": {"nbart_green": 1.0},
"blue": {"nbart_blue": 1.0},
},
"scale_range": [0.0, 3000.0],
}

style_combined_pure_blue = {
"name": "blue",
"title": "Blue - 480",
"abstract": "Blue band, centered on 480nm",
"components": {
"red": {"nbart_blue": 1.0},
"green": {"nbart_blue": 1.0},
"blue": {"nbart_blue": 1.0},
},
"scale_range": [0.0, 3000.0],
}

style_combined_pure_green = {
"name": "green",
"title": "Green - 560",
"abstract": "Green band, centered on 560nm",
"components": {
"red": {"nbart_green": 1.0},
"green": {"nbart_green": 1.0},
"blue": {"nbart_green": 1.0},
},
"scale_range": [0.0, 3000.0],
}

style_combined_pure_red = {
"name": "red",
"title": "Red - 660",
"abstract": "Red band, centered on 660nm",
"components": {
"red": {"nbart_red": 1.0},
"green": {"nbart_red": 1.0},
"blue": {"nbart_red": 1.0},
},
"scale_range": [0.0, 3000.0],
}


# Styles grouping
styles_combined = [
style_combined_true_colour,
style_combined_pure_blue,
style_combined_pure_green,
style_combined_pure_red,
]
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"title": "Baseline satellite data",
"abstract": "",
"layers": [
{
"include": "ows_refactored.baseline_satellite_data.landsat_s2_combined.ows_c3_cfg.combined_layer",
"type": "python",
},
{
"include": "ows_refactored.baseline_satellite_data.landsat.ows_c3_cfg.combined_layer",
"type": "python",
Expand Down

0 comments on commit 16ad4d1

Please sign in to comment.