From be9f239cfb9e0bcf0ac63ab7d190c3f8d0d81988 Mon Sep 17 00:00:00 2001 From: "pin.jin@ga.gov.au" Date: Mon, 23 May 2022 22:55:30 +0000 Subject: [PATCH 1/2] add 3x c3 layers --- prod/services/wms/inventory.json | 44 ++- .../inland_water/ows_category_root_cfg.py | 2 +- .../inland_water/tcw/ows_c3_tcp_cfg.py | 259 ++++++++++++++++++ .../inland_water/tcw/ows_tcw_cfg.py | 122 --------- .../land_and_vegetation/fc/band_fc_cfg.py | 13 + .../land_and_vegetation/fc/flag_fc_cfg.py | 6 +- .../land_and_vegetation/fc/ows_c3_fc_cfg.py | 12 +- .../land_and_vegetation/fc/ows_c3_fcp_cfg.py | 35 +++ .../land_and_vegetation/fc/ows_fc_cfg.py | 6 +- .../land_and_vegetation/fc/style_fc_cfg.py | 175 ++++++------ ...mangrove_cfg.py => ows_c3_mangrove_cfg.py} | 18 +- .../ows_category_root_cfg.py | 2 +- .../wms/ows_refactored/ows_legend_cfg.py | 2 +- .../wms/ows_refactored/ows_reslim_cfg.py | 12 +- 14 files changed, 456 insertions(+), 252 deletions(-) create mode 100644 prod/services/wms/ows_refactored/inland_water/tcw/ows_c3_tcp_cfg.py delete mode 100644 prod/services/wms/ows_refactored/inland_water/tcw/ows_tcw_cfg.py create mode 100644 prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_c3_fcp_cfg.py rename prod/services/wms/ows_refactored/land_and_vegetation/{ows_mangrove_cfg.py => ows_c3_mangrove_cfg.py} (79%) diff --git a/prod/services/wms/inventory.json b/prod/services/wms/inventory.json index 36eb1d317..067f610df 100644 --- a/prod/services/wms/inventory.json +++ b/prod/services/wms/inventory.json @@ -1,5 +1,5 @@ { - "total_layers_count": 68, + "total_layers_count": 69, "layers": [ { "layer": "ga_ls_ard_3", @@ -511,9 +511,29 @@ ] }, { - "layer": "mangrove_cover_v2_0_2", + "layer": "ga_ls_fc_pc_cyear_3", "product": [ - "mangrove_cover" + "ga_ls_fc_pc_cyear_3" + ], + "styles_count": 11, + "styles_list": [ + "green_veg_10", + "green_veg_50", + "green_veg_90", + "non_green_veg_10", + "non_green_veg_50", + "non_green_veg_90", + "bare_ground_10", + "bare_ground_50", + "bare_ground_90", + "qa", + "fc_rgb" + ] + }, + { + "layer": "ga_ls_mangrove_cover_cyear_3", + "product": [ + "ga_ls_mangrove_cover_cyear_3" ], "styles_count": 1, "styles_list": [ @@ -582,15 +602,21 @@ ] }, { - "layer": "ga_ls_tcw_percentiles_2", + "layer": "ga_ls_tc_pc_cyear_3", "product": [ - "ga_ls_tcw_percentiles_2" + "ga_ls_tc_pc_cyear_3" ], - "styles_count": 3, + "styles_count": 9, "styles_list": [ - "tcw_10_percentile", - "tcw_50_percentile", - "tcw_90_percentile" + "wet_10_percentile", + "wet_50_percentile", + "wet_90_percentile", + "green_10_percentile", + "green_50_percentile", + "green_90_percentile", + "bright_10_percentile", + "bright_50_percentile", + "bright_90_percentile" ] }, { diff --git a/prod/services/wms/ows_refactored/inland_water/ows_category_root_cfg.py b/prod/services/wms/ows_refactored/inland_water/ows_category_root_cfg.py index 79a0c57bf..7ea1d8fac 100644 --- a/prod/services/wms/ows_refactored/inland_water/ows_category_root_cfg.py +++ b/prod/services/wms/ows_refactored/inland_water/ows_category_root_cfg.py @@ -3,7 +3,7 @@ "abstract": "", "layers": [ { - "include": "ows_refactored.inland_water.tcw.ows_tcw_cfg.layers", + "include": "ows_refactored.inland_water.tcw.ows_c3_tcp_cfg.layers", "type": "python", }, { diff --git a/prod/services/wms/ows_refactored/inland_water/tcw/ows_c3_tcp_cfg.py b/prod/services/wms/ows_refactored/inland_water/tcw/ows_c3_tcp_cfg.py new file mode 100644 index 000000000..e4fcc699c --- /dev/null +++ b/prod/services/wms/ows_refactored/inland_water/tcw/ows_c3_tcp_cfg.py @@ -0,0 +1,259 @@ +from ows_refactored.ows_reslim_cfg import reslim_standard + +bands_tci_percentile = { + "wet_pc_10": [], + "wet_pc_50": [], + "wet_pc_90": [], + "green_pc_10": [], + "green_pc_50": [], + "green_pc_90": [], + "bright_pc_10": [], + "bright_pc_50": [], + "bright_pc_90": [], +} + +wet_legend = { + "begin": -1200, + "end": 0, + "tick_every": 120, + "title": "Tasseled Cap Wetness", + "rcParams": {"font.size": 9}, +} + +green_legend = { + "begin": 0, + "end": 2000, + "tick_every": 200, + "title": "Tasseled Cap Greenness", + "rcParams": {"font.size": 9}, +} + +bright_legend = { + "begin": 0, + "end": 4000, + "tick_every": 400, + "title": "Tasseled Cap Brightness", + "rcParams": {"font.size": 9}, +} + + +style_tcw_10 = { + "name": "wet_10_percentile", + "title": "Tasseled Cap Wetness 10th Percentile", + "abstract": "The 10th Percentile of Tasseled Cap Wetness Index", + "needed_bands": ["wet_pc_10"], + "index_function": { + "function": "datacube_ows.band_utils.single_band", + "mapped_bands": True, + "kwargs": { + "band": "wet_pc_10", + }, + }, + "range": [-1200.0, 0.0], + "mpl_ramp": "gist_earth_r", + "legend": wet_legend, +} + +style_tcw_50 = { + "name": "wet_50_percentile", + "title": "Tasseled Cap Wetness 50th Percentile", + "abstract": "The 50th Percentile of Tasseled Cap Wetness Index", + "needed_bands": ["wet_pc_50"], + "index_function": { + "function": "datacube_ows.band_utils.single_band", + "mapped_bands": True, + "kwargs": { + "band": "wet_pc_50", + }, + }, + "range": [-1200.0, 0.0], + "mpl_ramp": "gist_earth_r", + "legend": wet_legend, +} + +style_tcw_90 = { + "name": "wet_90_percentile", + "title": "Tasseled Cap Wetness 90th Percentile", + "abstract": "The 90th Percentile of Tasseled Cap Wetness Index", + "needed_bands": ["wet_pc_90"], + "index_function": { + "function": "datacube_ows.band_utils.single_band", + "mapped_bands": True, + "kwargs": { + "band": "wet_pc_90", + }, + }, + "range": [-1200.0, 0.0], + "mpl_ramp": "gist_earth_r", + "legend": wet_legend +} + +style_tcg_10 = { + "name": "green_10_percentile", + "title": "Tasseled Cap Greenness 10th Percentile", + "abstract": "The 10th Percentile of Tasseled Cap Greenness Index", + "needed_bands": ["green_pc_10"], + "index_function": { + "function": "datacube_ows.band_utils.single_band", + "mapped_bands": True, + "kwargs": { + "band": "green_pc_10", + }, + }, + "range": [0, 2000], + "mpl_ramp": "YlGn", + "legend": green_legend +} + +style_tcg_50 = { + "name": "green_50_percentile", + "title": "Tasseled Cap Greenness 50th Percentile", + "abstract": "The 50th Percentile of Tasseled Cap Greenness Index", + "needed_bands": ["green_pc_50"], + "index_function": { + "function": "datacube_ows.band_utils.single_band", + "mapped_bands": True, + "kwargs": { + "band": "green_pc_50", + }, + }, + "range": [0, 2000], + "mpl_ramp": "YlGn", + "legend": green_legend +} + +style_tcg_90 = { + "name": "green_90_percentile", + "title": "Tasseled Cap Greenness 90th Percentile", + "abstract": "The 90th Percentile of Tasseled Cap Greenness Index", + "needed_bands": ["green_pc_90"], + "index_function": { + "function": "datacube_ows.band_utils.single_band", + "mapped_bands": True, + "kwargs": { + "band": "green_pc_90", + }, + }, + "range": [0, 2000], + "mpl_ramp": "YlGn", + "legend": green_legend +} + +style_tcb_10 = { + "name": "bright_10_percentile", + "title": "Tasseled Cap Brightness 10th Percentile", + "abstract": "The 10th Percentile of Tasseled Cap Brightness Index", + "needed_bands": ["bright_pc_10"], + "index_function": { + "function": "datacube_ows.band_utils.single_band", + "mapped_bands": True, + "kwargs": { + "band": "bright_pc_10", + }, + }, + "range": [0, 4000.0], + "mpl_ramp": "Wistia", + "legend": bright_legend +} + +style_tcb_50 = { + "name": "bright_50_percentile", + "title": "Tasseled Cap Brightness 50th Percentile", + "abstract": "The 50th Percentile of Tasseled Cap Brightness Index", + "needed_bands": ["bright_pc_50"], + "index_function": { + "function": "datacube_ows.band_utils.single_band", + "mapped_bands": True, + "kwargs": { + "band": "bright_pc_50", + }, + }, + "range": [0, 4000.0], + "mpl_ramp": "Wistia", + "legend": bright_legend +} + +style_tcb_90 = { + "name": "bright_90_percentile", + "title": "Tasseled Cap Brightness 90th Percentile", + "abstract": "The 90th Percentile of Tasseled Cap Brightness Index", + "needed_bands": ["bright_pc_90"], + "index_function": { + "function": "datacube_ows.band_utils.single_band", + "mapped_bands": True, + "kwargs": { + "band": "bright_pc_90", + }, + }, + "range": [0, 4000.0], + "mpl_ramp": "Wistia", + "legend": bright_legend +} + +layers = { + "title": "DEA Tasseled Cap Indices Percentiles (Landsat)", + "abstract": "", + "layers": [ + { + "title": "DEA Tasseled Cap Indices Percentiles Calendar Year (Landsat)", + "name": "ga_ls_tc_pc_cyear_3", + "abstract": """Tasseled Cap Indices Percentiles 30m 1.0.0 + +The Tasseled Cap Indices Percentiles provide an annual summary of landscape wetness, greenness and brightness indices that can be used to identify wetlands and groundwater ecosystems. + +They provide annual statistical summaries (10th, 50th and 90th percentiles) of the Tasseled Cap indicies. + +They are intended for use as inputs into classification algorithms to identify potential wetlands and groundwater dependent ecosystems, and characterise salt flats, clay pans, salt lakes and coastal land forms. + +Geoscience Australia Landsat Collection 3 Tasseled Cap Indices Percentiles, 30 metre, Australian Albers Equal Area projection (EPSG:3577). +Data is only visible at higher resolutions; when zoomed-out the available area will be displayed as a shaded region. +Areas that are partially covered in water, or where water is mixed with vegetation when viewed from above, provide habitat for a wide range of aquatic organisms. +The ability to map partial inundation is also crucial to understand patterns of human water use. We need to be able to identify potential wetlands and groundwater dependent ecosystems on the Australian continent so that they can be monitored and managed. +The Tasseled Cap Wetness Percentiles provide a multi-decadal summary of landscape wetness that can be used to identify wetlands and groundwater ecosystems. +They provide statistical summaries (10th, 50th and 90th percentiles) of the Tasseled Cap wetness index from 1987 to 2017. +They are intended for use as inputs into classification algorithms to identify potential wetlands and groundwater dependent ecosystems, and characterise salt flats, clay pans, salt lakes and coastal land forms. +This product provides valuable discrimination for characterising: + - vegetated wetlands, + - salt flats, + - salt lakes, + - coastal land cover classes +The Tasseled Cap indices transform translates the six spectral bands of Landsat into a single wetness index. The wetness index can be used to identify areas in the landscape that are potentially wetlands or groundwater dependent ecosystems. The Tasseled Cap Indices Percentiles capture how the wetness, greeness and brightness index behaves over time. The percentiles are well suited to characterising wetlands, salt flats/salt lakes and coastal ecosystems. However, care should be applied when analysing the wetness index, as soil colour and fire scars can cause misleading results. In areas of high relief caused by cliffs or steep terrain, terrain shadows can cause false positives (a falsely high wetness index). +The 10th, 50th and 90th percentiles of the Tasseled Cap Indices are intended to capture the extreme (10th and 90th percentile) values and long-term average (50th percentile) values of the indices. Percentiles are used in preference to minimum, maximum and mean, as the min/max/mean statistical measures are more sensitive to undetected cloud/cloud shadow, and can be misleading for non-normally distributed data. +The Tasseled Cap Indices Percentiles are intended to complement the Water Observations (WO) algorithm. WO is designed to discriminate open water, but the Tasseled Cap wetness index identifies areas of water and areas where water and vegetation are mixed together; i.e. mangroves and palustrine wetlands. +If you are interested in terrestrial vegetation (where water in the pixel is not a factor), use the Fractional Cover product, which provides a better biophysical characterisation of green vegetation fraction, dry vegetation fraction and bare soil vegetation fraction. +In terms of limitations, caution should be used, especially with the Tasseled Cap Indices results in areas where residual terrain shadow, or dark soils can cause high 'wetness' index values. +One of the limitations of using the Tasseled Cap wetness index is that it will identify all 'wet' things, including potential wetlands, groundwater dependent ecosystems, irrigated crops/pasture, man-made water storages and sewerage treatment, and does not discriminate between these. As such it should be used in conjunction with other contextual data to ensure that features identified using the Tasseled Cap Wetness Percentiles are features of interest rather than false positives. +We used the Tasseled Cap transforms described in Crist et al. (1985). +Crist, E. P. (1985). A TM Tasseled Cap equivalent transformation for reflectance factor data. Remote Sensing of Environment, 17(3), 301–306. https://doi.org/10.1016/0034-4257(85)90102-6 + +https://cmi.ga.gov.au/data-products/dea/337/dea-wetness-percentiles-landsat + +For service status information, see https://status.dea.ga.gov.au""", + "product_name": "ga_ls_tc_pc_cyear_3", + "bands": bands_tci_percentile, + "resource_limits": reslim_standard, + "native_crs": "EPSG:3577", + "native_resolution": [30, -30], + "time_resolution": "year", + "image_processing": { + "extent_mask_func": "datacube_ows.ogc_utils.mask_by_val", + "always_fetch_bands": [], + "manual_merge": False, + }, + "styling": { + "default_style": "wet_10_percentile", + "styles": [ + style_tcw_10, + style_tcw_50, + style_tcw_90, + style_tcg_10, + style_tcg_50, + style_tcg_90, + style_tcb_10, + style_tcb_50, + style_tcb_90, + ], + }, + }, + ], +} diff --git a/prod/services/wms/ows_refactored/inland_water/tcw/ows_tcw_cfg.py b/prod/services/wms/ows_refactored/inland_water/tcw/ows_tcw_cfg.py deleted file mode 100644 index 4c537f0fd..000000000 --- a/prod/services/wms/ows_refactored/inland_water/tcw/ows_tcw_cfg.py +++ /dev/null @@ -1,122 +0,0 @@ -from ows_refactored.ows_reslim_cfg import reslim_standard - -bands_tcw_percentile = { - "TCW_PC_10": [], - "TCW_PC_50": [], - "TCW_PC_90": [], -} - -style_tcw_10 = { - "name": "tcw_10_percentile", - "title": "Tasseled Cap Wetness 10th Percentile", - "abstract": "The 10th Percentile of Tasseled Cap Wetness Index (1986-2018)", - "needed_bands": ["TCW_PC_10"], - "index_function": { - "function": "datacube_ows.band_utils.single_band", - "mapped_bands": True, - "kwargs": { - "band": "TCW_PC_10", - }, - }, - "range": [-1200.0, 0.0], - "mpl_ramp": "gist_earth_r", - "legend": { - "url": "https://data.dea.ga.gov.au/derivative/ga_ls_tcw_percentiles_2/tcw_percentiles_legend.png", - }, -} - -style_tcw_50 = { - "name": "tcw_50_percentile", - "title": "Tasseled Cap Wetness 50th Percentile", - "abstract": "The 50th Percentile of Tasseled Cap Wetness Index (1986-2018)", - "needed_bands": ["TCW_PC_50"], - "index_function": { - "function": "datacube_ows.band_utils.single_band", - "mapped_bands": True, - "kwargs": { - "band": "TCW_PC_50", - }, - }, - "range": [-1200.0, 0.0], - "mpl_ramp": "gist_earth_r", - "legend": { - "url": "https://data.dea.ga.gov.au/derivative/ga_ls_tcw_percentiles_2/tcw_percentiles_legend.png", - }, -} - -style_tcw_90 = { - "name": "tcw_90_percentile", - "title": "Tasseled Cap Wetness 90th Percentile", - "abstract": "The 90th Percentile of Tasseled Cap Wetness Index (1986-2018)", - "needed_bands": ["TCW_PC_90"], - "index_function": { - "function": "datacube_ows.band_utils.single_band", - "mapped_bands": True, - "kwargs": { - "band": "TCW_PC_90", - }, - }, - "range": [-1200.0, 0.0], - "mpl_ramp": "gist_earth_r", - "legend": { - "url": "https://data.dea.ga.gov.au/derivative/ga_ls_tcw_percentiles_2/tcw_percentiles_legend.png", - }, -} - - -layers = { - "title": "DEA Wetness Percentiles (Landsat)", - "abstract": "", - "layers": [ - { - "title": "DEA Wetness Percentiles (Landsat)", - "name": "ga_ls_tcw_percentiles_2", - "abstract": """Tasseled Cap Wetness Percentiles 25m 2.0.0 - -The Tasseled Cap Wetness Percentiles provide a multi-decadal summary of landscape wetness that can be used to identify wetlands and groundwater ecosystems. - -They provide statistical summaries (10th, 50th and 90th percentiles) of the Tasseled Cap wetness index from 1987 to 2017. - -They are intended for use as inputs into classification algorithms to identify potential wetlands and groundwater dependent ecosystems, and characterise salt flats, clay pans, salt lakes and coastal land forms. - -Geoscience Australia Landsat Collection 2 Tasseled Cap Wetness Percentiles 1986-2018, 25 metre, 100km tile, Australian Albers Equal Area projection (EPSG:3577). -Data is only visible at higher resolutions; when zoomed-out the available area will be displayed as a shaded region. -Areas that are partially covered in water, or where water is mixed with vegetation when viewed from above, provide habitat for a wide range of aquatic organisms. -The ability to map partial inundation is also crucial to understand patterns of human water use. We need to be able to identify potential wetlands and groundwater dependent ecosystems on the Australian continent so that they can be monitored and managed. -The Tasseled Cap Wetness Percentiles provide a multi-decadal summary of landscape wetness that can be used to identify wetlands and groundwater ecosystems. -They provide statistical summaries (10th, 50th and 90th percentiles) of the Tasseled Cap wetness index from 1987 to 2017. -They are intended for use as inputs into classification algorithms to identify potential wetlands and groundwater dependent ecosystems, and characterise salt flats, clay pans, salt lakes and coastal land forms. -This product provides valuable discrimination for characterising: - - vegetated wetlands, - - salt flats, - - salt lakes, - - coastal land cover classes -The Tasseled Cap wetness transform translates the six spectral bands of Landsat into a single wetness index. The wetness index can be used to identify areas in the landscape that are potentially wetlands or groundwater dependent ecosystems. The Tasseled Cap Wetness Percentiles capture how the wetness index behaves over time. The percentiles are well suited to characterising wetlands, salt flats/salt lakes and coastal ecosystems. However, care should be applied when analysing the wetness index, as soil colour and fire scars can cause misleading results. In areas of high relief caused by cliffs or steep terrain, terrain shadows can cause false positives (a falsely high wetness index). -The 10th, 50th and 90th percentiles of the Tasseled Cap wetness index are intended to capture the extreme (10th and 90th percentile) values and long-term average (50th percentile) values of the wetness index. Percentiles are used in preference to minimum, maximum and mean, as the min/max/mean statistical measures are more sensitive to undetected cloud/cloud shadow, and can be misleading for non-normally distributed data. -The Tasseled Cap Wetness Percentiles are intended to complement the Water Observations from Space (WOfS) algorithm. WOfS is designed to discriminate open water, but the Tasseled Cap wetness index identifies areas of water and areas where water and vegetation are mixed together; i.e. mangroves and palustrine wetlands. -If you are interested in terrestrial vegetation (where water in the pixel is not a factor), use the Fractional Cover product, which provides a better biophysical characterisation of green vegetation fraction, dry vegetation fraction and bare soil vegetation fraction. -In terms of limitations, caution should be used, especially with the Tasseled Cap wetness index results in areas where residual terrain shadow, or dark soils can cause high 'wetness' index values. -One of the limitations of using the Tasseled Cap wetness index is that it will identify all 'wet' things, including potential wetlands, groundwater dependent ecosystems, irrigated crops/pasture, man-made water storages and sewerage treatment, and does not discriminate between these. As such it should be used in conjunction with other contextual data to ensure that features identified using the Tasseled Cap Wetness Percentiles are features of interest rather than false positives. -We used the Tasseled Cap transforms described in Crist et al. (1985). -Crist, E. P. (1985). A TM Tasseled Cap equivalent transformation for reflectance factor data. Remote Sensing of Environment, 17(3), 301–306. https://doi.org/10.1016/0034-4257(85)90102-6 - -https://cmi.ga.gov.au/data-products/dea/337/dea-wetness-percentiles-landsat - -For service status information, see https://status.dea.ga.gov.au""", - "product_name": "ga_ls_tcw_percentiles_2", - "bands": bands_tcw_percentile, - "resource_limits": reslim_standard, - "native_crs": "EPSG:3577", - "native_resolution": [25, -25], - "image_processing": { - "extent_mask_func": "datacube_ows.ogc_utils.mask_by_val", - "always_fetch_bands": [], - "manual_merge": False, - }, - "styling": { - "default_style": "tcw_10_percentile", - "styles": [style_tcw_10, style_tcw_50, style_tcw_90], - }, - }, - ], -} diff --git a/prod/services/wms/ows_refactored/land_and_vegetation/fc/band_fc_cfg.py b/prod/services/wms/ows_refactored/land_and_vegetation/fc/band_fc_cfg.py index 03309fde9..01befa7a2 100644 --- a/prod/services/wms/ows_refactored/land_and_vegetation/fc/band_fc_cfg.py +++ b/prod/services/wms/ows_refactored/land_and_vegetation/fc/band_fc_cfg.py @@ -1,3 +1,16 @@ +bands_fc_percentile = { + "pv_pc_10": [], + "pv_pc_50": [], + "pv_pc_90": [], + "npv_pc_10": [], + "npv_pc_50": [], + "npv_pc_90": [], + "bs_pc_10": [], + "bs_pc_50": [], + "bs_pc_90": [], + "qa": [], +} + bands_fc_3 = { "bs": ["bare_soil"], "pv": ["photosynthetic_vegetation", "green_vegetation"], diff --git a/prod/services/wms/ows_refactored/land_and_vegetation/fc/flag_fc_cfg.py b/prod/services/wms/ows_refactored/land_and_vegetation/fc/flag_fc_cfg.py index 084bc3aed..c1c7bfd2f 100644 --- a/prod/services/wms/ows_refactored/land_and_vegetation/fc/flag_fc_cfg.py +++ b/prod/services/wms/ows_refactored/land_and_vegetation/fc/flag_fc_cfg.py @@ -7,12 +7,10 @@ }, ] -fc_pq_mask = [ +fc_percentile_pq_mask = [ { "band": "land", - "flags": { - "sea": True, - }, "invert": True, + "values": [0], }, ] diff --git a/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_c3_fc_cfg.py b/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_c3_fc_cfg.py index dbc5e6d55..baa37c1ee 100644 --- a/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_c3_fc_cfg.py +++ b/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_c3_fc_cfg.py @@ -1,6 +1,6 @@ from ows_refactored.land_and_vegetation.fc.band_fc_cfg import bands_fc_3 from ows_refactored.land_and_vegetation.fc.style_fc_cfg import ( - style_fc_bs_c3, style_fc_c3_rgb, style_fc_gv_c3, style_fc_ngv_c3) + styles_fc_c3_masked, styles_fc_c3_unmasked) from ows_refactored.ows_reslim_cfg import reslim_standard layer = { @@ -50,11 +50,9 @@ ], "styling": { "default_style": "fc_rgb", - "styles": [ - style_fc_c3_rgb, - style_fc_bs_c3, - style_fc_gv_c3, - style_fc_ngv_c3, - ], + # FOR DEV ONLY - DO NOT PROMOTE UNMASKED STYLES TO PROD + "styles": styles_fc_c3_masked + styles_fc_c3_unmasked + # FOR PROD ONLY - DO NOT REMOVE UNMASKED STYLES FROM DEV + # "styles": styles_fc_c3_masked }, } diff --git a/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_c3_fcp_cfg.py b/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_c3_fcp_cfg.py new file mode 100644 index 000000000..3da4863ab --- /dev/null +++ b/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_c3_fcp_cfg.py @@ -0,0 +1,35 @@ +from ows_refactored.land_and_vegetation.fc.band_fc_cfg import \ + bands_fc_percentile +from ows_refactored.land_and_vegetation.fc.flag_fc_cfg import \ + fc_percentile_flags +from ows_refactored.land_and_vegetation.fc.style_fc_cfg import \ + styles_fc_pc_list +from ows_refactored.ows_reslim_cfg import reslim_standard + +layer = { + "title": "DEA Fractional Cover Percentiles Calendar Year (Landsat)", + "name": "ga_ls_fc_pc_cyear_3", + "abstract": """Fractional Cover 30m Percentiles 3.0.0 (Landsat, Annual) +Data is only visible at higher resolutions; when zoomed-out the available area will be displayed as a shaded region. +Fractional cover provides information about the the proportions of green vegetation, non-green vegetation (including deciduous trees during autumn, dry grass, etc.), and bare areas for every 30m x 30m ground footprint. Fractional cover provides insight into how areas of dry vegetation and/or bare soil and green vegetation are changing over time. The percentile summaries are designed to make it easier to analyse and interpret fractional cover. Percentiles provide an indicator of where an observation sits, relative to the rest of the observations for the pixel. For example, the 90th percentile is the value below which 90% of the observations fall. The fractional cover algorithm was developed by the Joint Remote Sensing Research Program, for more information please see data.auscover.org.au/xwiki/bin/view/Product+pages/Landsat+Fractional+Cover +This contains the percentage of green vegetation, non-green vegetation and bare soil per pixel at the 10th, 50th (median) and 90th percentiles respectively for observations acquired in each full calendar year (1st of January - 31st December) from 1987 to the most recent full calendar year. +Fractional Cover products use Water Observations (WO) to mask out areas of water, cloud and other phenomena. To be considered in the FCP product a pixel must have had at least 3 clear observations over the year. +https://cmi.ga.gov.au/data-products/dea/120/dea-fractional-cover-percentiles-landsat +For service status information, see https://status.dea.ga.gov.au""", + "product_name": "ga_ls_fc_pc_cyear_3", + "bands": bands_fc_percentile, + "resource_limits": reslim_standard, + "flags": fc_percentile_flags, + "native_crs": "EPSG:3577", + "native_resolution": [30, -30], + "time_resolution": "year", + "image_processing": { + "extent_mask_func": "datacube_ows.ogc_utils.mask_by_val", + "always_fetch_bands": [], + "manual_merge": False, + }, + "styling": { + "default_style": "fc_rgb", + "styles": styles_fc_pc_list, + }, +} diff --git a/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_fc_cfg.py b/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_fc_cfg.py index a91c33b81..8ab146400 100644 --- a/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_fc_cfg.py +++ b/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_fc_cfg.py @@ -12,6 +12,10 @@ { "include": "ows_refactored.land_and_vegetation.fc.ows_c3_fc_cfg.layer", "type": "python", - } + }, + { + "include": "ows_refactored.land_and_vegetation.fc.ows_c3_fcp_cfg.layer", + "type": "python", + }, ] } diff --git a/prod/services/wms/ows_refactored/land_and_vegetation/fc/style_fc_cfg.py b/prod/services/wms/ows_refactored/land_and_vegetation/fc/style_fc_cfg.py index 65b299819..72ae713d5 100644 --- a/prod/services/wms/ows_refactored/land_and_vegetation/fc/style_fc_cfg.py +++ b/prod/services/wms/ows_refactored/land_and_vegetation/fc/style_fc_cfg.py @@ -1,4 +1,5 @@ -from ows_refactored.land_and_vegetation.fc.flag_fc_cfg import fc_pq_mask +from ows_refactored.land_and_vegetation.fc.flag_fc_cfg import \ + fc_percentile_pq_mask from ows_refactored.ows_legend_cfg import ( legend_idx_0_100_pixel_fc_25ticks, legend_idx_0_100_pixel_fc_bs_25ticks, legend_idx_0_100_pixel_fc_ngv_25ticks) @@ -194,56 +195,19 @@ style_fc_bs_c3_unmasked, style_fc_gv_c3_unmasked, style_fc_ngv_c3_unmasked ] -style_fc_simple_rgb = { - "name": "simple_rgb", - "title": "Simple RGB", - "abstract": "Simple true-colour image, using the red, green and blue bands", - "components": { - "red": {"BS_PC_50": 1.0}, - "green": {"PV_PC_50": 1.0}, - "blue": {"NPV_PC_50": 1.0}, - }, - "scale_range": [0.0, 100.0], - "pq_masks": fc_pq_mask, -} - -style_fc_simple = { - "name": "simple_fc", - "title": "Fractional Cover", - "abstract": "Fractional cover representation, with green vegetation in green, dead vegetation in blue, and bare soil in red", - "components": {"red": {"BS": 1.0}, "green": {"PV": 1.0}, "blue": {"NPV": 1.0}}, - "scale_range": [0.0, 100.0], - "pq_masks": [ - { - "band": "water", - "flags": {"dry": True}, - }, - { - "band": "water", - "flags": { - "terrain_or_low_angle": False, - "high_slope": False, - "cloud_shadow": False, - "cloud": False, - "sea": False, - } - }, - ], -} - style_fc_gv_10 = { "name": "green_veg_10", - "title": "10th Percentile", + "title": "Green Vegetation 10th Percentile", "abstract": "10th Percentile of Green Vegetation", "index_function": { "function": "datacube_ows.band_utils.single_band", "mapped_bands": True, "kwargs": { - "band": "PV_PC_10", + "band": "pv_pc_10", }, }, "include_in_feature_info": False, - "needed_bands": ["PV_PC_10"], + "needed_bands": ["pv_pc_10"], "color_ramp": [ { "value": 0, @@ -266,23 +230,23 @@ "color": "#006837", }, ], - "pq_masks": fc_pq_mask, + "pq_masks": fc_percentile_pq_mask, "legend": legend_idx_0_100_pixel_fc_25ticks, } style_fc_gv_50 = { "name": "green_veg_50", - "title": "50th Percentile", + "title": "Green Vegetation 50th Percentile", "abstract": "50th Percentile of Green Vegetation", "index_function": { "function": "datacube_ows.band_utils.single_band", "mapped_bands": True, "kwargs": { - "band": "PV_PC_50", + "band": "pv_pc_50", }, }, "include_in_feature_info": False, - "needed_bands": ["PV_PC_50"], + "needed_bands": ["pv_pc_50"], "color_ramp": [ {"value": 0, "color": "#ffffcc"}, {"value": 25, "color": "#c2e699"}, @@ -292,22 +256,22 @@ ], # old behaviour was wrong. This is what Leo and Emma requested "legend": legend_idx_0_100_pixel_fc_25ticks, - "pq_masks": fc_pq_mask, + "pq_masks": fc_percentile_pq_mask, } style_fc_gv_90 = { "name": "green_veg_90", - "title": "90th Percentile", + "title": "Green Vegetation 90th Percentile", "abstract": "90th Percentile of Green Vegetation", "index_function": { "function": "datacube_ows.band_utils.single_band", "mapped_bands": True, "kwargs": { - "band": "PV_PC_90", + "band": "pv_pc_90", }, }, "include_in_feature_info": False, - "needed_bands": ["PV_PC_90"], + "needed_bands": ["pv_pc_90"], "color_ramp": [ {"value": 0, "color": "#ffffcc"}, {"value": 25, "color": "#c2e699"}, @@ -317,22 +281,22 @@ ], # old behaviour was wrong. This is what Leo and Emma requested "legend": legend_idx_0_100_pixel_fc_25ticks, - "pq_masks": fc_pq_mask, + "pq_masks": fc_percentile_pq_mask, } style_fc_ngv_10 = { "name": "non_green_veg_10", - "title": "10th Percentile", + "title": "Non-green Vegetation 10th Percentile", "abstract": "10th Percentile of Non Green Vegetation", "index_function": { "function": "datacube_ows.band_utils.single_band", "mapped_bands": True, "kwargs": { - "band": "NPV_PC_10", + "band": "npv_pc_10", }, }, "include_in_feature_info": False, - "needed_bands": ["NPV_PC_10"], + "needed_bands": ["npv_pc_10"], "color_ramp": [ { "value": 0, @@ -354,22 +318,22 @@ ], # Emulates what we had previously "legend": legend_idx_0_100_pixel_fc_ngv_25ticks, - "pq_masks": fc_pq_mask, + "pq_masks": fc_percentile_pq_mask, } style_fc_ngv_50 = { "name": "non_green_veg_50", - "title": "50th Percentile", + "title": "Non-green Vegetation 50th Percentile", "abstract": "50th Percentile of Non Green Vegetation", "index_function": { "function": "datacube_ows.band_utils.single_band", "mapped_bands": True, "kwargs": { - "band": "NPV_PC_50", + "band": "npv_pc_50", }, }, "include_in_feature_info": False, - "needed_bands": ["NPV_PC_50"], + "needed_bands": ["npv_pc_50"], "color_ramp": [ {"value": 0, "color": "#ffffd4"}, {"value": 25, "color": "#fed98e"}, @@ -379,22 +343,22 @@ ], # old behaviour was wrong. This is what Leo and Emma requested "legend": legend_idx_0_100_pixel_fc_ngv_25ticks, - "pq_masks": fc_pq_mask, + "pq_masks": fc_percentile_pq_mask, } style_fc_ngv_90 = { "name": "non_green_veg_90", - "title": "90th Percentile", + "title": "Non-green Vegetation 90th Percentile", "abstract": "90th Percentile of Non Green Vegetation", "index_function": { "function": "datacube_ows.band_utils.single_band", "mapped_bands": True, "kwargs": { - "band": "NPV_PC_90", + "band": "npv_pc_90", }, }, "include_in_feature_info": False, - "needed_bands": ["NPV_PC_90"], + "needed_bands": ["npv_pc_90"], "color_ramp": [ {"value": 0, "color": "#ffffd4"}, {"value": 25, "color": "#fed98e"}, @@ -404,22 +368,22 @@ ], # old behaviour was wrong. This is what Leo and Emma requested "legend": legend_idx_0_100_pixel_fc_ngv_25ticks, - "pq_masks": fc_pq_mask, + "pq_masks": fc_percentile_pq_mask, } style_fc_bs_10 = { "name": "bare_ground_10", - "title": "10th Percentile", + "title": "Bare soil 10th Percentile", "abstract": "10th Percentile of Bare Soil", "index_function": { "function": "datacube_ows.band_utils.single_band", "mapped_bands": True, "kwargs": { - "band": "BS_PC_10", + "band": "bs_pc_10", }, }, "include_in_feature_info": False, - "needed_bands": ["BS_PC_10"], + "needed_bands": ["bs_pc_10"], "color_ramp": [ { "value": 0, @@ -442,24 +406,24 @@ "color": "#7a0177", }, ], - "pq_masks": fc_pq_mask, + "pq_masks": fc_percentile_pq_mask, # Emulates what we had previously "legend": legend_idx_0_100_pixel_fc_bs_25ticks, } style_fc_bs_50 = { "name": "bare_ground_50", - "title": "50th Percentile", + "title": "Bare soil 50th Percentile", "abstract": "50th Percentile of Bare Soil", "index_function": { "function": "datacube_ows.band_utils.single_band", "mapped_bands": True, "kwargs": { - "band": "BS_PC_50", + "band": "bs_pc_50", }, }, "include_in_feature_info": False, - "needed_bands": ["BS_PC_50"], + "needed_bands": ["bs_pc_50"], "color_ramp": [ {"value": 0, "color": "#feebe2"}, {"value": 25, "color": "#fbb4b9"}, @@ -469,22 +433,22 @@ ], # Old behaviour was wrong - this is what Leo and Emma have requested. "legend": legend_idx_0_100_pixel_fc_bs_25ticks, - "pq_masks": fc_pq_mask, + "pq_masks": fc_percentile_pq_mask, } style_fc_bs_90 = { "name": "bare_ground_90", - "title": "90th Percentile", + "title": "Bare soil 90th Percentile", "abstract": "90th Percentile of Bare Soil", "index_function": { "function": "datacube_ows.band_utils.single_band", "mapped_bands": True, "kwargs": { - "band": "BS_PC_90", + "band": "bs_pc_90", }, }, "include_in_feature_info": False, - "needed_bands": ["BS_PC_90"], + "needed_bands": ["bs_pc_90"], "color_ramp": [ {"value": 0, "color": "#feebe2"}, {"value": 25, "color": "#fbb4b9"}, @@ -494,7 +458,52 @@ ], # Old behaviour was wrong - this is what Leo and Emma have requested. "legend": legend_idx_0_100_pixel_fc_bs_25ticks, - "pq_masks": fc_pq_mask, + "pq_masks": fc_percentile_pq_mask, +} + +style_fc_pc_qa = { + "name": "qa", + "title": "Quality Assurance", + "abstract": "Quality Assurance", + "index_function": { + "function": "datacube_ows.band_utils.single_band", + "mapped_bands": True, + "kwargs": { + "band": "qa", + }, + }, + "include_in_feature_info": False, + "needed_bands": ["qa"], + "value_map": { + "qa": [ + { + "title": "Insufficient observations wet", + "abstract": "", + "values": [ + 0, + ], + "color": "#7884A2", + }, + { + "title": "Insufficient observations dry", + "abstract": "", + "values": [ + 1, + ], + "color": "#A29678", + }, + { + "title": "Sufficient observations", + "abstract": "", + "values": [ + 2, + ], + "color": "#84A278", + }, + + ], + }, + "pq_masks": fc_percentile_pq_mask, } style_fc_rgb = { @@ -502,32 +511,28 @@ "title": "Three-band fractional cover", "abstract": "Fractional cover medians - red is bare soil, green is green vegetation and blue is non-green vegetation", "components": { - "red": {"BS_PC_50": 1.0}, - "green": {"PV_PC_50": 1.0}, - "blue": {"NPV_PC_50": 1.0}, + "red": {"bs_pc_50": 1.0}, + "green": {"pv_pc_50": 1.0}, + "blue": {"npv_pc_50": 1.0}, }, "scale_range": [0.0, 100.0], - "pq_masks": fc_pq_mask, + "pq_masks": fc_percentile_pq_mask, "legend": { "show_legend": True, "url": "https://data.dea.ga.gov.au/fractional-cover/FC_legend.png", }, } -styles_fc_gv_list = [ +styles_fc_pc_list = [ + style_fc_rgb, style_fc_gv_10, style_fc_gv_50, style_fc_gv_90, -] - -styles_fc_ngv_list = [ style_fc_ngv_10, style_fc_ngv_50, style_fc_ngv_90, -] - -styles_fc_bare_list = [ style_fc_bs_10, style_fc_bs_50, style_fc_bs_90, + style_fc_pc_qa, ] diff --git a/prod/services/wms/ows_refactored/land_and_vegetation/ows_mangrove_cfg.py b/prod/services/wms/ows_refactored/land_and_vegetation/ows_c3_mangrove_cfg.py similarity index 79% rename from prod/services/wms/ows_refactored/land_and_vegetation/ows_mangrove_cfg.py rename to prod/services/wms/ows_refactored/land_and_vegetation/ows_c3_mangrove_cfg.py index b8542eec1..49dbd6de9 100644 --- a/prod/services/wms/ows_refactored/land_and_vegetation/ows_mangrove_cfg.py +++ b/prod/services/wms/ows_refactored/land_and_vegetation/ows_c3_mangrove_cfg.py @@ -2,7 +2,6 @@ bands_mangrove = { "canopy_cover_class": [], - "extent": [], } style_mangrove_cover_v2 = { @@ -46,27 +45,26 @@ "layers": [ { "title": "DEA Mangroves (Landsat)", - "name": "mangrove_cover_v2_0_2", - "abstract": """Mangrove Canopy Cover 25m 2.0.2 (Landsat) + "name": "ga_ls_mangrove_cover_cyear_3", + "abstract": """Mangrove Canopy Cover 30m 2.0.2 (Landsat, Collection 3) -Mangrove canopy cover version 2.0.2, 25 metre, 100km tile, Australian Albers Equal Area projection (EPSG:3577). Data is only visible at higher resolutions; when zoomed-out the available area will be displayed as a shaded region. +Mangrove canopy cover version 2.0.2, 30 metre. Data is only visible at higher resolutions; when zoomed-out the available area will be displayed as a shaded region. The mangrove canopy cover product provides valuable information about the extent and canopy density of mangroves for each year between 1987 and 2016 for the entire Australian coastline. The canopy cover classes are: 20-50% (pale green), 50-80% (mid green), 80-100% (dark green). -The product consists of a sequence (one per year) of 25 meter resolution maps that are generated by analysing the Landsat fractional cover (https://doi.org/10.6084/m9.figshare.94250.v1) developed by the Joint Remote Sensing Research Program and the Global Mangrove Watch layers (https://doi.org/10.1071/MF13177) developed by the Japanese Aerospace Exploration Agency. +The product consists of a sequence (one per year) of 30 meter resolution maps that are generated by analysing the Landsat fractional cover (https://doi.org/10.6084/m9.figshare.94250.v1) developed by the Joint Remote Sensing Research Program and the Global Mangrove Watch layers (https://doi.org/10.1071/MF13177) developed by the Japanese Aerospace Exploration Agency. https://cmi.ga.gov.au/data-products/dea/191/dea-mangrove-canopy-cover-landsat For service status information, see https://status.dea.ga.gov.au""", - "product_name": "mangrove_cover", + "product_name": "ga_ls_mangrove_cover_cyear_3", "bands": bands_mangrove, "resource_limits": reslim_standard, "native_crs": "EPSG:3577", - "native_resolution": [25, -25], + "native_resolution": [30, -30], + "time_resolution": "year", "image_processing": { - "extent_mask_func": "datacube_ows.ogc_utils.mask_by_extent_val", - "always_fetch_bands": ["extent"], - "manual_merge": False, + "extent_mask_func": "datacube_ows.ogc_utils.mask_by_val", }, "styling": { "default_style": "mangrove", diff --git a/prod/services/wms/ows_refactored/land_and_vegetation/ows_category_root_cfg.py b/prod/services/wms/ows_refactored/land_and_vegetation/ows_category_root_cfg.py index 34d50d316..f869b7933 100644 --- a/prod/services/wms/ows_refactored/land_and_vegetation/ows_category_root_cfg.py +++ b/prod/services/wms/ows_refactored/land_and_vegetation/ows_category_root_cfg.py @@ -11,7 +11,7 @@ "type": "python", }, { - "include": "ows_refactored.land_and_vegetation.ows_mangrove_cfg.layer", + "include": "ows_refactored.land_and_vegetation.ows_c3_mangrove_cfg.layer", "type": "python", }, { diff --git a/prod/services/wms/ows_refactored/ows_legend_cfg.py b/prod/services/wms/ows_refactored/ows_legend_cfg.py index 5295fab22..9b332c304 100644 --- a/prod/services/wms/ows_refactored/ows_legend_cfg.py +++ b/prod/services/wms/ows_refactored/ows_legend_cfg.py @@ -98,7 +98,7 @@ "end": 100, "units": "% / pixel", "ticks_every": 25, - "title": "Percentage of Pixel that is Green Vegetation", + "title": "Percentage of Pixel that is Non-green Vegetation", "rcParams": {"font.size": 9}, } diff --git a/prod/services/wms/ows_refactored/ows_reslim_cfg.py b/prod/services/wms/ows_refactored/ows_reslim_cfg.py index 914e23846..514f742ec 100644 --- a/prod/services/wms/ows_refactored/ows_reslim_cfg.py +++ b/prod/services/wms/ows_refactored/ows_reslim_cfg.py @@ -55,14 +55,4 @@ "dataset_cache_rules": dataset_cache_rules, }, "wcs": common_wcs_limits, -} - -# N.B. not used in prod. -reslim_wms_max_datasets_only = { - "wms": { - "zoomed_out_fill_colour": [150, 180, 200, 160], - "min_zoom_factor": 500.0, - "max_datasets": 6, - }, - "wcs": common_wcs_limits, -} +} \ No newline at end of file From 979ade96383a8025d47958612a5e2f4af2ad3841 Mon Sep 17 00:00:00 2001 From: "pin.jin@ga.gov.au" Date: Mon, 23 May 2022 23:07:49 +0000 Subject: [PATCH 2/2] revert c3 fc change --- .../land_and_vegetation/fc/ows_c3_fc_cfg.py | 12 +++++++----- prod/services/wms/ows_refactored/ows_reslim_cfg.py | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_c3_fc_cfg.py b/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_c3_fc_cfg.py index baa37c1ee..dbc5e6d55 100644 --- a/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_c3_fc_cfg.py +++ b/prod/services/wms/ows_refactored/land_and_vegetation/fc/ows_c3_fc_cfg.py @@ -1,6 +1,6 @@ from ows_refactored.land_and_vegetation.fc.band_fc_cfg import bands_fc_3 from ows_refactored.land_and_vegetation.fc.style_fc_cfg import ( - styles_fc_c3_masked, styles_fc_c3_unmasked) + style_fc_bs_c3, style_fc_c3_rgb, style_fc_gv_c3, style_fc_ngv_c3) from ows_refactored.ows_reslim_cfg import reslim_standard layer = { @@ -50,9 +50,11 @@ ], "styling": { "default_style": "fc_rgb", - # FOR DEV ONLY - DO NOT PROMOTE UNMASKED STYLES TO PROD - "styles": styles_fc_c3_masked + styles_fc_c3_unmasked - # FOR PROD ONLY - DO NOT REMOVE UNMASKED STYLES FROM DEV - # "styles": styles_fc_c3_masked + "styles": [ + style_fc_c3_rgb, + style_fc_bs_c3, + style_fc_gv_c3, + style_fc_ngv_c3, + ], }, } diff --git a/prod/services/wms/ows_refactored/ows_reslim_cfg.py b/prod/services/wms/ows_refactored/ows_reslim_cfg.py index 514f742ec..087438361 100644 --- a/prod/services/wms/ows_refactored/ows_reslim_cfg.py +++ b/prod/services/wms/ows_refactored/ows_reslim_cfg.py @@ -55,4 +55,4 @@ "dataset_cache_rules": dataset_cache_rules, }, "wcs": common_wcs_limits, -} \ No newline at end of file +}