Interactive interface for browsing global, full-resolution satellite imagery
WV-2638: Dynamic Data Visualization -updated (#4458)
Ryan Weiler9e7759f2a95d
diff --git a/config/default/common/config/metadata/layers/multi-mission/hls/HLS_Customizable_Landsat.md b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_Customizable_Landsat.mdnew file mode 100644index 000000000..a81654d1c--- /dev/null+++ b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_Customizable_Landsat.md@@ -0,0 +1,9 @@+**NOTE: This layer is undergoing beta testing.**++This Reflectance imagery layer can be customized to display any available Red-Green-Blue (R-G-B) band combination. Select the desired combination in via the Options panel. The layer is dynamically generated, therefore it may take longer to display.++The Reflectance imagery layer from Landsat 8 and 9/OLI product (L30) is available through the HLS project from the Operational Land Imager (OLI) aboard the Landsat 8 and 9 satellites. The sensor resolution is 30 m, imagery resolution is 30 m, and the temporal resolution is daily with a 16 day revisit time. The imagery is available in Worldview/GIBS approximately 2 - 4 days after satellite overpass. There is a separate combined Sentinel 2A and Sentinel 2B imagery layer available.++This imagery layer is provided dynamically through the [NASA Interagency Implementation and Advanced Concepts Team (IMPACT)](https://earthdata.nasa.gov/esds/impact). As it is dynamically generated, it may take slightly longer to display than normal. The imagery is also only available at higher zoom levels.++References: HLSL30 v002 [doi:10.5067/HLS/HLSL30.002](https://doi.org/10.5067/HLS/HLSL30.002)\ No newline at end of filediff --git a/config/default/common/config/metadata/layers/multi-mission/hls/HLS_Customizable_Sentinel.md b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_Customizable_Sentinel.mdnew file mode 100644index 000000000..8acd074ea--- /dev/null+++ b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_Customizable_Sentinel.md@@ -0,0 +1,9 @@+**NOTE: This layer is undergoing beta testing.**++This Reflectance imagery layer can be customized to display any available Red-Green-Blue (R-G-B) band combination. Select the desired combination in via the Options panel. The layer is dynamically generated, therefore it may take longer to display.++The Reflectance imagery layer from Sentinel 2A and 2B/MSI product (S30) is available through the HLS project from the Multi-Spectral Instrument (MSI) aboard the European Union’s Copernicus Sentinel-2A and Sentinel-2B satellites. The sensor resolution is 10, 20, and 60 m, imagery resolution is resampled to 30 m, and the temporal resolution is daily with a 5 day revisit time. The imagery is available in Worldview/GIBS approximately 2 - 4 days after satellite overpass. There is a separate combined Landsat 8 and 9 imagery layer available.++This imagery layer is provided dynamically through the [NASA Interagency Implementation and Advanced Concepts Team (IMPACT)](https://earthdata.nasa.gov/esds/impact). As it is dynamically generated, it may take slightly longer to display than normal. The imagery is also only available at higher zoom levels.++References: HLSS30 v002 [doi:10.5067/HLS/HLSS30.002](https://doi.org/10.5067/HLS/HLSS30.002)\ No newline at end of filediff --git a/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Landsat.md b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Landsat.mdnew file mode 100644index 000000000..78c431c49--- /dev/null+++ b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Landsat.md@@ -0,0 +1,9 @@+**NOTE: This layer is undergoing beta testing.**++The dynamically generated Reflectance (Bands 5-4-3, False Color) imagery layer is a false color composite that is used to gauge plant health and assess plant density. Plants reflect in near infrared and green light, while absorbing in red. Areas with better vegetation health appear red, and denser plant growth is a darker red. Cities, urban areas, and exposed ground appear grey or tan and water is blue or black.++The Reflectance imagery layer from Landsat 8 and 9/OLI product (L30) is available through the HLS project from the Operational Land Imager (OLI) aboard the Landsat 8 and 9 satellites. The sensor resolution is 30 m, imagery resolution is 30 m, and the temporal resolution is daily with a 16 day revisit time. The imagery is available in Worldview/GIBS approximately 2 - 4 days after satellite overpass. There is a separate combined Sentinel 2A and Sentinel 2B imagery layer available.++This imagery layer is provided dynamically through the [NASA Interagency Implementation and Advanced Concepts Team (IMPACT)](https://earthdata.nasa.gov/esds/impact). As it is dynamically generated, it may take slightly longer to display than normal. The imagery is also only available at higher zoom levels.++References: HLSL30 v002 [doi:10.5067/HLS/HLSL30.002](https://doi.org/10.5067/HLS/HLSL30.002)diff --git a/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Sentinel.md b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Sentinel.mdnew file mode 100644index 000000000..1a6368583--- /dev/null+++ b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Sentinel.md@@ -0,0 +1,8 @@+**NOTE: This layer is undergoing beta testing.**++The dynamically generated Reflectance (Bands 8-4-3, False Color) imagery layer is a false color composite that is used to gauge plant health and assess plant density. Plants reflect in near infrared and green light, while absorbing in red. reas with better vegetation health appear red, and denser plant growth is a darker red. Cities, urban areas, and exposed ground appear grey or tan and water is blue or black.+The Reflectance imagery layer from Sentinel 2A and 2B/MSI product (S30) is available through the HLS project from the Multi-Spectral Instrument (MSI) aboard the European Union’s Copernicus Sentinel-2A and Sentinel-2B satellites. The sensor resolution is 10, 20, and 60 m, imagery resolution is resampled to 30 m, and the temporal resolution is daily with a 5 day revisit time. The imagery is available in Worldview/GIBS approximately 2 - 4 days after satellite overpass. There is a separate combined Landsat 8 and 9 imagery layer available.++This imagery layer is provided dynamically through the [NASA Interagency Implementation and Advanced Concepts Team (IMPACT)](https://earthdata.nasa.gov/esds/impact). As it is dynamically generated, it may take slightly longer to display than normal. The imagery is only available at higher zoom levels.++References: HLSS30 v002 [doi:10.5067/HLS/HLSS30.002](https://doi.org/10.5067/HLS/HLSS30.002)\ No newline at end of filediff --git a/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Urban_Landsat.md b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Urban_Landsat.mdnew file mode 100644index 000000000..a6cdf2c35--- /dev/null+++ b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Urban_Landsat.md@@ -0,0 +1,9 @@+**NOTE: This layer is undergoing beta testing.**++The dynamically generated Reflectance (Bands 7-6-4, Urban False Color) imagery layer is useful for visualizing urban areas more clearly. Urban areas are white, grey, or purple and vegetation appear in shades of green. Snow and ice are dark blue, and water is black or blue. Flooded areas are very dark blue, sometimes black. Wildfires and lava in calderas of volcanoes display in shades of yellow and red.++The Reflectance imagery layer from Landsat 8 and 9/OLI product (L30) is available through the HLS project from the Operational Land Imager (OLI) aboard the Landsat 8 and 9 satellites. The sensor resolution is 30 m, imagery resolution is 30 m, and the temporal resolution is daily with a 16 day revisit time. The imagery is available in Worldview/GIBS approximately 2 - 4 days after satellite overpass. There is a separate combined Sentinel 2A and Sentinel 2B imagery layer available.++This imagery layer is provided dynamically through the [NASA Interagency Implementation and Advanced Concepts Team (IMPACT)](https://earthdata.nasa.gov/esds/impact). As it is dynamically generated, it may take slightly longer to display than normal. The imagery is also only available at higher zoom levels.++References: HLSL30 v002 [doi:10.5067/HLS/HLSL30.002](https://doi.org/10.5067/HLS/HLSL30.002)\ No newline at end of filediff --git a/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Urban_Sentinel.md b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Urban_Sentinel.mdnew file mode 100644index 000000000..bb7141d9f--- /dev/null+++ b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Urban_Sentinel.md@@ -0,0 +1,10 @@+**NOTE: This layer is undergoing beta testing.**++The dynamically generated Reflectance (Bands 12-11-4, Urban False Color) imagery layer is useful for visualizing urban areas more clearly. Urban areas are white, grey, or purple and vegetation appear in shades of green. Snow and ice are dark blue, and water is black or blue. Flooded areas are very dark blue, sometimes black. Wildfires and lava in calderas of volcanoes display in shades of yellow and red.+++The Reflectance imagery layer from Sentinel 2A and 2B/MSI product (S30) is available through the HLS project from the Multi-Spectral Instrument (MSI) aboard the European Union’s Copernicus Sentinel-2A and Sentinel-2B satellites. The sensor resolution is 10, 20, and 60 m, imagery resolution is resampled to 30 m, and the temporal resolution is daily with a 5 day revisit time. The imagery is available in Worldview/GIBS approximately 2 - 4 days after satellite overpass. There is a separate combined Landsat 8 and 9 imagery layer available.++This imagery layer is provided dynamically through the [NASA Interagency Implementation and Advanced Concepts Team (IMPACT)](https://earthdata.nasa.gov/esds/impact). As it is dynamically generated, it may take slightly longer to display than normal. The imagery is also only available at higher zoom levels.++References: HLSS30 v002 [doi:10.5067/HLS/HLSS30.002](https://doi.org/10.5067/HLS/HLSS30.002)\ No newline at end of filediff --git a/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Vegetation_Landsat.md b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Vegetation_Landsat.mdnew file mode 100644index 000000000..f54c34dca--- /dev/null+++ b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Vegetation_Landsat.md@@ -0,0 +1,9 @@+**NOTE: This layer is undergoing beta testing.**++The dynamically generated Reflectance (Bands 6-5-4, Vegetative Analysis False Color) imagery layer is useful for looking at vegetation. Vegetation are in shades of green. Burned areas appear bright red, while bare ground appear light red/pink. Water is black.++The Reflectance imagery layer from Landsat 8 and 9/OLI product (L30) is available through the HLS project from the Operational Land Imager (OLI) aboard the Landsat 8 and 9 satellites. The sensor resolution is 30 m, imagery resolution is 30 m, and the temporal resolution is daily with a 16 day revisit time. The imagery is available in Worldview/GIBS approximately 2 - 4 days after satellite overpass. There is a separate combined Sentinel 2A and Sentinel 2B imagery layer available.++This imagery layer is provided dynamically through the [NASA Interagency Implementation and Advanced Concepts Team (IMPACT)](https://earthdata.nasa.gov/esds/impact). As it is dynamically generated, it may take slightly longer to display than normal. The imagery is also only available at higher zoom levels.++References: HLSL30 v002 [doi:10.5067/HLS/HLSL30.002](https://doi.org/10.5067/HLS/HLSL30.002)\ No newline at end of filediff --git a/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Vegetation_Sentinel.md b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Vegetation_Sentinel.mdnew file mode 100644index 000000000..544667499--- /dev/null+++ b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_False_Color_Vegetation_Sentinel.md@@ -0,0 +1,9 @@+**NOTE: This layer is undergoing beta testing.**++The dynamically generated Reflectance (Bands 11-8A-4, Vegetative Analysis False Color) imagery layer is useful for looking at vegetation. Vegetation are in shades of green. Burned areas appear bright red, while bare ground appear light red/pink. Water is black.++The Reflectance imagery layer from Sentinel 2A and 2B/MSI product (S30) is available through the HLS project from the Multi-Spectral Instrument (MSI) aboard the European Union’s Copernicus Sentinel-2A and Sentinel-2B satellites. The sensor resolution is 10, 20, and 60 m, imagery resolution is resampled to 30 m, and the temporal resolution is daily with a 5 day revisit time. The imagery is available in Worldview/GIBS approximately 2 - 4 days after satellite overpass. There is a separate combined Landsat 8 and 9 imagery layer available.++This imagery layer is provided dynamically through the [NASA Interagency Implementation and Advanced Concepts Team (IMPACT)](https://earthdata.nasa.gov/esds/impact). As it is dynamically generated, it may take slightly longer to display than normal. The imagery is also only available at higher zoom levels.++References: HLSS30 v002 [doi:10.5067/HLS/HLSS30.002](https://doi.org/10.5067/HLS/HLSS30.002)\ No newline at end of filediff --git a/config/default/common/config/metadata/layers/multi-mission/hls/HLS_Shortwave_Infrared_Landsat.md b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_Shortwave_Infrared_Landsat.mdnew file mode 100644index 000000000..93b941577--- /dev/null+++ b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_Shortwave_Infrared_Landsat.md@@ -0,0 +1,9 @@+**NOTE: This layer is undergoing beta testing.**++The dynamically generated Reflectance (Bands 7-5-4, Shortwave Infrared) imagery layer is useful looking at how much water is present in plants and soils, as water absorbs in shortwave infrared wavelengths. It can be used to distinguish between cloud types like water clouds versus ice clouds, snow and ice, which appear white. Vegetation is in shades of green, soils and urban areas are in shades of brown, and water is black. Freshly burned areas appear red.++The Reflectance imagery layer from Landsat 8 and 9/OLI product (L30) is available through the HLS project from the Operational Land Imager (OLI) aboard the Landsat 8 and 9 satellites. The sensor resolution is 30 m, imagery resolution is 30 m, and the temporal resolution is daily with a 16 day revisit time. The imagery is available in Worldview/GIBS approximately 2 - 4 days after satellite overpass. There is a separate combined Sentinel 2A and Sentinel 2B imagery layer available.++This imagery layer is provided dynamically through the [NASA Interagency Implementation and Advanced Concepts Team (IMPACT)](https://earthdata.nasa.gov/esds/impact). As it is dynamically generated, it may take slightly longer to display than normal. The imagery is also only available at higher zoom levels.++References: HLSL30 v002 [doi:10.5067/HLS/HLSL30.002](https://doi.org/10.5067/HLS/HLSL30.002)\ No newline at end of filediff --git a/config/default/common/config/metadata/layers/multi-mission/hls/HLS_Shortwave_Infrared_Sentinel.md b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_Shortwave_Infrared_Sentinel.mdnew file mode 100644index 000000000..efd54c102--- /dev/null+++ b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_Shortwave_Infrared_Sentinel.md@@ -0,0 +1,9 @@+**NOTE: This layer is undergoing beta testing.**++The dynamically generated Reflectance (Bands 12-8A-4, Shortwave Infrared) imagery layer is useful looking at how much water is present in plants and soils, as water absorbs in shortwave infrared wavelengths. It can be used to distinguish between cloud types like water clouds versus ice clouds, snow and ice, which appear white. Vegetation is in shades of green, soils and urban areas are in shades of brown, and water is black. Freshly burned areas appear red.++The Reflectance imagery layer from Sentinel 2A and 2B/MSI product (S30) is available through the HLS project from the Multi-Spectral Instrument (MSI) aboard the European Union’s Copernicus Sentinel-2A and Sentinel-2B satellites. The sensor resolution is 10, 20, and 60 m, imagery resolution is resampled to 30 m, and the temporal resolution is daily with a 5 day revisit time. The imagery is available in Worldview/GIBS approximately 2 - 4 days after satellite overpass. There is a separate combined Landsat 8 and 9 imagery layer available.++This imagery layer is provided dynamically through the [NASA Interagency Implementation and Advanced Concepts Team (IMPACT)](https://earthdata.nasa.gov/esds/impact). As it is dynamically generated, it may take slightly longer to display than normal. The imagery is also only available at higher zoom levels.++References: HLSS30 v002 [doi:10.5067/HLS/HLSS30.002](https://doi.org/10.5067/HLS/HLSS30.002)\ No newline at end of filediff --git a/config/default/common/config/metadata/layers/multi-mission/hls/HLS_True_Color_Landsat.md b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_True_Color_Landsat.mdnew file mode 100644index 000000000..1a5a72b23--- /dev/null+++ b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_True_Color_Landsat.md@@ -0,0 +1,9 @@+**NOTE: This layer is undergoing beta testing.**++The dynamically generated Reflectance (Bands 4-3-2, True Color) imagery layer is a true-color or natural color image because this combination of wavelengths is similar to what the human eye would see. It consists of natural-looking images of land surface, oceanic and atmospheric features.++The Reflectance imagery layer from Landsat 8 and 9/OLI product (L30) is available through the HLS project from the Operational Land Imager (OLI) aboard the Landsat 8 and 9 satellites. The sensor resolution is 30 m, imagery resolution is 30 m, and the temporal resolution is daily with a 16 day revisit time. The imagery is available in Worldview/GIBS approximately 2 - 4 days after satellite overpass. There is a separate combined Sentinel 2A and Sentinel 2B imagery layer available.++This imagery layer is provided dynamically through the [NASA Interagency Implementation and Advanced Concepts Team (IMPACT)](https://earthdata.nasa.gov/esds/impact). As it is dynamically generated, it may take slightly longer to display than normal. The imagery is also only available at higher zoom levels.++References: HLSL30 v002 [doi:10.5067/HLS/HLSL30.002](https://doi.org/10.5067/HLS/HLSL30.002)\ No newline at end of filediff --git a/config/default/common/config/metadata/layers/multi-mission/hls/HLS_True_Color_Sentinel.md b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_True_Color_Sentinel.mdnew file mode 100644index 000000000..9d7faec3a--- /dev/null+++ b/config/default/common/config/metadata/layers/multi-mission/hls/HLS_True_Color_Sentinel.md@@ -0,0 +1,9 @@+**NOTE: This layer is undergoing beta testing.**++The dynamically generated Reflectance (Bands 4-3-2, True Color) imagery layer is a true-color or natural color image because this combination of wavelengths is similar to what the human eye would see. It consists of natural-looking images of land surface, oceanic and atmospheric features.++The Reflectance imagery layer from Sentinel 2A and 2B/MSI product (S30) is available through the HLS project from the Multi-Spectral Instrument (MSI) aboard the European Union’s Copernicus Sentinel-2A and Sentinel-2B satellites. The sensor resolution is 10, 20, and 60 m, imagery resolution is resampled to 30 m, and the temporal resolution is daily with a 5 day revisit time. The imagery is available in Worldview/GIBS approximately 2 - 4 days after satellite overpass. There is a separate combined Landsat 8 and 9 imagery layer available.++This imagery layer is provided dynamically through the [NASA Interagency Implementation and Advanced Concepts Team (IMPACT)](https://earthdata.nasa.gov/esds/impact). As it is dynamically generated, it may take slightly longer to display than normal. The imagery is also only available at higher zoom levels.++References: HLSS30 v002 [doi:10.5067/HLS/HLSS30.002](https://doi.org/10.5067/HLS/HLSS30.002)\ No newline at end of filediff --git a/config/default/common/config/wv.json/layerOrder.json b/config/default/common/config/wv.json/layerOrder.jsonindex 144deff09..493d08724 100644--- a/config/default/common/config/wv.json/layerOrder.json+++ b/config/default/common/config/wv.json/layerOrder.json@@ -1,5 +1,17 @@{"layerOrder": [+ "HLS_Customizable_Landsat",+ "HLS_Customizable_Sentinel",+ "HLS_True_Color_Sentinel",+ "HLS_False_Color_Sentinel",+ "HLS_False_Color_Urban_Sentinel",+ "HLS_False_Color_Vegetation_Sentinel",+ "HLS_Shortwave_Infrared_Sentinel",+ "HLS_True_Color_Landsat",+ "HLS_False_Color_Landsat",+ "HLS_False_Color_Vegetation_Landsat",+ "HLS_False_Color_Urban_Landsat",+ "HLS_Shortwave_Infrared_Landsat","VIIRS_SNPP_CorrectedReflectance_TrueColor_Granule","VIIRS_SNPP_CorrectedReflectance_BandsM11-I2-I1_Granule","VIIRS_SNPP_CorrectedReflectance_BandsM3-I3-M11_Granule",diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Customizable_Landsat.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Customizable_Landsat.jsonnew file mode 100644index 000000000..3a998e689--- /dev/null+++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Customizable_Landsat.json@@ -0,0 +1,31 @@+{+ "layers": {+ "HLS_Customizable_Landsat": {+ "id": "HLS_Customizable_Landsat",+ "title": "HLS Customizable Landsat *BETA*",+ "subtitle": "Landsat 8 & 9 / OLI",+ "description": "multi-mission/hls/HLS_Customizable_Landsat",+ "tags": "corrected surface landsat oli l30",+ "group": "overlays",+ "layergroup": "Land Surface Reflectance",+ "format": "image/png",+ "type": "ttiler",+ "period": "daily",+ "orbitTracks": ["OrbitTracks_Landsat-8_Descending", "OrbitTracks_Landsat-9_Descending"],+ "orbitDirection": ["descending", "descending"],+ "bandCombo": {+ "r": "B07",+ "g": "B05",+ "b": "B04"+ },+ "disableSnapshot": true,+ "wrapX": false,+ "projections": {+ "geographic": {+ "source": "DDV",+ "matrixSet": "31.25m"+ }+ }+ }+ }+}diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Customizable_Sentinel.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Customizable_Sentinel.jsonnew file mode 100644index 000000000..8f129f54b--- /dev/null+++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Customizable_Sentinel.json@@ -0,0 +1,31 @@+{+ "layers": {+ "HLS_Customizable_Sentinel": {+ "id": "HLS_Customizable_Sentinel",+ "title": "HLS Customizable Sentinel *BETA*",+ "subtitle": "Sentinel 2A & 2B / MSI",+ "description": "multi-mission/hls/HLS_Customizable_Sentinel",+ "tags": "corrected surface oli sentinel msi s30",+ "group": "overlays",+ "layergroup": "Land Surface Reflectance",+ "format": "image/png",+ "type": "ttiler",+ "period": "daily",+ "orbitTracks": ["OrbitTracks_Sentinel-2A_Descending", "OrbitTracks_Sentinel-2B_Descending"],+ "orbitDirection": ["descending", "descending"],+ "bandCombo": {+ "r": "B07",+ "g": "B05",+ "b": "B04"+ },+ "wrapX": false,+ "disableSnapshot": true,+ "projections": {+ "geographic": {+ "source": "DDV",+ "matrixSet": "31.25m"+ }+ }+ }+ }+}diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Landsat.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Landsat.jsonnew file mode 100644index 000000000..aee386702--- /dev/null+++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Landsat.json@@ -0,0 +1,31 @@+{+ "layers": {+ "HLS_False_Color_Landsat": {+ "id": "HLS_False_Color_Landsat",+ "title": "Reflectance (Bands 5-4-3, False Color) *BETA*",+ "subtitle": "Landsat 8 & 9 / OLI",+ "description": "multi-mission/hls/HLS_False_Color_Landsat",+ "tags": "corrected surface oli l30 cir false color",+ "group": "overlays",+ "layergroup": "Land Surface Reflectance",+ "format": "image/png",+ "type": "ttiler",+ "period": "daily",+ "orbitTracks": ["OrbitTracks_Landsat-8_Descending", "OrbitTracks_Landsat-9_Descending"],+ "orbitDirection": ["descending", "descending"],+ "bandCombo": {+ "r": "B05",+ "g": "B04",+ "b": "B03"+ },+ "wrapX": false,+ "disableSnapshot": true,+ "projections": {+ "geographic": {+ "source": "DDV",+ "matrixSet": "31.25m"+ }+ }+ }+ }+}diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Sentinel.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Sentinel.jsonnew file mode 100644index 000000000..cf0c90c03--- /dev/null+++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Sentinel.json@@ -0,0 +1,31 @@+{+ "layers": {+ "HLS_False_Color_Sentinel": {+ "id": "HLS_False_Color_Sentinel",+ "title": "Reflectance (Bands 8-4-3, False Color) *BETA*",+ "subtitle": "Sentinel 2A & 2B / MSI",+ "description": "multi-mission/hls/HLS_False_Color_Sentinel",+ "tags": "corrected surface oli sentinel msi s30",+ "group": "overlays",+ "layergroup": "Land Surface Reflectance",+ "format": "image/png",+ "type": "ttiler",+ "period": "daily",+ "orbitTracks": ["OrbitTracks_Sentinel-2A_Descending", "OrbitTracks_Sentinel-2B_Descending"],+ "orbitDirection": ["descending", "descending"],+ "bandCombo": {+ "r": "B08",+ "g": "B04",+ "b": "B03"+ },+ "wrapX": false,+ "disableSnapshot": true,+ "projections": {+ "geographic": {+ "source": "DDV",+ "matrixSet": "31.25m"+ }+ }+ }+ }+}diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Urban_Landsat.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Urban_Landsat.jsonnew file mode 100644index 000000000..1357e595f--- /dev/null+++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Urban_Landsat.json@@ -0,0 +1,31 @@+{+ "layers": {+ "HLS_False_Color_Urban_Landsat": {+ "id": "HLS_False_Color_Urban_Landsat",+ "title": "Reflectance (Bands 7-6-4, Urban False Color) *BETA*",+ "subtitle": "Landsat 8 & 9 / OLI",+ "description": "multi-mission/hls/HLS_False_Color_Urban_Landsat",+ "tags": "corrected surface oli sentinel msi s30",+ "group": "overlays",+ "layergroup": "Land Surface Reflectance",+ "format": "image/png",+ "type": "ttiler",+ "period": "daily",+ "orbitTracks": ["OrbitTracks_Landsat-8_Descending", "OrbitTracks_Landsat-9_Descending"],+ "orbitDirection": ["descending", "descending"],+ "bandCombo": {+ "r": "B07",+ "g": "B06",+ "b": "B04"+ },+ "wrapX": false,+ "disableSnapshot": true,+ "projections": {+ "geographic": {+ "source": "DDV",+ "matrixSet": "31.25m"+ }+ }+ }+ }+}diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Urban_Sentinel.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Urban_Sentinel.jsonnew file mode 100644index 000000000..39ef78f4d--- /dev/null+++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Urban_Sentinel.json@@ -0,0 +1,31 @@+{+ "layers": {+ "HLS_False_Color_Urban_Sentinel": {+ "id": "HLS_False_Color_Urban_Sentinel",+ "title": "Reflectance (Bands 12-11-4, Urban False Color) *BETA*",+ "subtitle": "Sentinel 2A & 2B / MSI",+ "description": "multi-mission/hls/HLS_False_Color_Urban_Sentinel",+ "tags": "corrected surface oli sentinel msi s30",+ "group": "overlays",+ "layergroup": "Land Surface Reflectance",+ "format": "image/png",+ "type": "ttiler",+ "period": "daily",+ "orbitTracks": ["OrbitTracks_Sentinel-2A_Descending", "OrbitTracks_Sentinel-2B_Descending"],+ "orbitDirection": ["descending", "descending"],+ "bandCombo": {+ "r": "B12",+ "g": "B11",+ "b": "B04"+ },+ "wrapX": false,+ "disableSnapshot": true,+ "projections": {+ "geographic": {+ "source": "DDV",+ "matrixSet": "31.25m"+ }+ }+ }+ }+}diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Vegetation_Landsat.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Vegetation_Landsat.jsonnew file mode 100644index 000000000..d405f4f00--- /dev/null+++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Vegetation_Landsat.json@@ -0,0 +1,31 @@+{+ "layers": {+ "HLS_False_Color_Vegetation_Landsat": {+ "id": "HLS_False_Color_Vegetation_Landsat",+ "title": "Reflectance (Bands 6-5-4, Vegetative Analysis False Color) *BETA*",+ "subtitle": "Landsat 8 & 9 / OLI",+ "description": "multi-mission/hls/HLS_False_Color_Vegetation_Landsat",+ "tags": "corrected surface oli l30",+ "group": "overlays",+ "layergroup": "Land Surface Reflectance",+ "format": "image/png",+ "type": "ttiler",+ "period": "daily",+ "orbitTracks": ["OrbitTracks_Landsat-8_Descending", "OrbitTracks_Landsat-9_Descending"],+ "orbitDirection": ["descending", "descending"],+ "bandCombo": {+ "r": "B06",+ "g": "B05",+ "b": "B04"+ },+ "wrapX": false,+ "disableSnapshot": true,+ "projections": {+ "geographic": {+ "source": "DDV",+ "matrixSet": "31.25m"+ }+ }+ }+ }+}diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Vegetation_Sentinel.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Vegetation_Sentinel.jsonnew file mode 100644index 000000000..7860e193a--- /dev/null+++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_False_Color_Vegetation_Sentinel.json@@ -0,0 +1,31 @@+{+ "layers": {+ "HLS_False_Color_Vegetation_Sentinel": {+ "id": "HLS_False_Color_Vegetation_Sentinel",+ "title": "Reflectance (Bands 11-8A-4, Vegetative Analysis False Color) *BETA*",+ "subtitle": "Sentinel 2A & 2B / MSI",+ "description": "multi-mission/hls/HLS_False_Color_Vegetation_Sentinel",+ "tags": "corrected surface oli sentinel msi s30",+ "group": "overlays",+ "layergroup": "Land Surface Reflectance",+ "format": "image/png",+ "type": "ttiler",+ "period": "daily",+ "orbitTracks": ["OrbitTracks_Sentinel-2A_Descending", "OrbitTracks_Sentinel-2B_Descending"],+ "orbitDirection": ["descending", "descending"],+ "bandCombo": {+ "r": "B11",+ "g": "B8A",+ "b": "B04"+ },+ "wrapX": false,+ "disableSnapshot": true,+ "projections": {+ "geographic": {+ "source": "DDV",+ "matrixSet": "31.25m"+ }+ }+ }+ }+}diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Shortwave_Infrared_Landsat.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Shortwave_Infrared_Landsat.jsonnew file mode 100644index 000000000..22c708d3e--- /dev/null+++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Shortwave_Infrared_Landsat.json@@ -0,0 +1,31 @@+{+ "layers": {+ "HLS_Shortwave_Infrared_Landsat": {+ "id": "HLS_Shortwave_Infrared_Landsat",+ "title": "Reflectance (Bands 7-5-4, Shortwave Infrared) *BETA*",+ "subtitle": "Landsat 8 & 9 / OLI",+ "description": "multi-mission/hls/HLS_Shortwave_Infrared_Landsat",+ "tags": "corrected surface oli l30 swir",+ "group": "overlays",+ "layergroup": "Land Surface Reflectance",+ "format": "image/png",+ "type": "ttiler",+ "period": "daily",+ "orbitTracks": ["OrbitTracks_Landsat-8_Descending", "OrbitTracks_Landsat-9_Descending"],+ "orbitDirection": ["descending", "descending"],+ "bandCombo": {+ "r": "B07",+ "g": "B05",+ "b": "B04"+ },+ "wrapX": false,+ "disableSnapshot": true,+ "projections": {+ "geographic": {+ "source": "DDV",+ "matrixSet": "31.25m"+ }+ }+ }+ }+}diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Shortwave_Infrared_Sentinel.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Shortwave_Infrared_Sentinel.jsonnew file mode 100644index 000000000..2baf0e5ad--- /dev/null+++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Shortwave_Infrared_Sentinel.json@@ -0,0 +1,31 @@+{+ "layers": {+ "HLS_Shortwave_Infrared_Sentinel": {+ "id": "HLS_Shortwave_Infrared_Sentinel",+ "title": "Reflectance (Bands 12-8A-4, Shortwave Infrared) *BETA*",+ "subtitle": "Sentinel 2A & 2B / MSI",+ "description": "multi-mission/hls/HLS_Shortwave_Infrared_Sentinel",+ "tags": "corrected surface oli sentinel msi s30 swir",+ "group": "overlays",+ "layergroup": "Land Surface Reflectance",+ "format": "image/png",+ "type": "ttiler",+ "period": "daily",+ "orbitTracks": ["OrbitTracks_Sentinel-2A_Descending", "OrbitTracks_Sentinel-2B_Descending"],+ "orbitDirection": ["descending", "descending"],+ "bandCombo": {+ "r": "B12",+ "g": "B8A",+ "b": "B04"+ },+ "wrapX": false,+ "disableSnapshot": true,+ "projections": {+ "geographic": {+ "source": "DDV",+ "matrixSet": "31.25m"+ }+ }+ }+ }+}diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_True_Color_Landsat.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_True_Color_Landsat.jsonnew file mode 100644index 000000000..99c57a3b1--- /dev/null+++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_True_Color_Landsat.json@@ -0,0 +1,31 @@+{+ "layers": {+ "HLS_True_Color_Landsat": {+ "id": "HLS_True_Color_Landsat",+ "title": "Reflectance (Bands 4-3-2, True Color) *BETA*",+ "subtitle": "Landsat 8 & 9 / OLI",+ "description": "multi-mission/hls/HLS_True_Color_Landsat",+ "tags": "corrected surface oli sentinel msi s30 natural",+ "group": "overlays",+ "layergroup": "Land Surface Reflectance",+ "format": "image/png",+ "type": "ttiler",+ "period": "daily",+ "orbitTracks": ["OrbitTracks_Landsat-8_Descending", "OrbitTracks_Landsat-9_Descending"],+ "orbitDirection": ["descending", "descending"],+ "bandCombo": {+ "r": "B04",+ "g": "B03",+ "b": "B02"+ },+ "wrapX": false,+ "disableSnapshot": true,+ "projections": {+ "geographic": {+ "source": "DDV",+ "matrixSet": "31.25m"+ }+ }+ }+ }+}diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_True_Color_Sentinel.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_True_Color_Sentinel.jsonnew file mode 100644index 000000000..fcd1328a2--- /dev/null+++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_True_Color_Sentinel.json@@ -0,0 +1,31 @@+{+ "layers": {+ "HLS_True_Color_Sentinel": {+ "id": "HLS_True_Color_Sentinel",+ "title": "Reflectance (Bands 4-3-2, True Color) *BETA*",+ "subtitle": "Sentinel 2A & 2B / MSI",+ "description": "multi-mission/hls/HLS_True_Color_Sentinel",+ "tags": "corrected surface oli sentinel msi s30 natural",+ "group": "overlays",+ "layergroup": "Land Surface Reflectance",+ "format": "image/png",+ "type": "ttiler",+ "period": "daily",+ "orbitTracks": ["OrbitTracks_Sentinel-2A_Descending", "OrbitTracks_Sentinel-2B_Descending"],+ "orbitDirection": ["descending", "descending"],+ "bandCombo": {+ "r": "B04",+ "g": "B03",+ "b": "B02"+ },+ "wrapX": false,+ "disableSnapshot": true,+ "projections": {+ "geographic": {+ "source": "DDV",+ "matrixSet": "31.25m"+ }+ }+ }+ }+}diff --git a/config/default/common/config/wv.json/measurements/Featured - Land Surface Reflectance.json b/config/default/common/config/wv.json/measurements/Featured - Land Surface Reflectance.jsonindex 0c6607dc5..f53a1a2e6 100644--- a/config/default/common/config/wv.json/measurements/Featured - Land Surface Reflectance.json+++ b/config/default/common/config/wv.json/measurements/Featured - Land Surface Reflectance.json@@ -12,6 +12,12 @@"image": "","settings": ["HLS_S30_Nadir_BRDF_Adjusted_Reflectance",+ "HLS_Customizable_Sentinel",+ "HLS_True_Color_Sentinel",+ "HLS_False_Color_Sentinel",+ "HLS_False_Color_Urban_Sentinel",+ "HLS_False_Color_Vegetation_Sentinel",+ "HLS_Shortwave_Infrared_Sentinel","HLS_MGRS_Granule_Grid","OrbitTracks_Sentinel-2A_Descending","OrbitTracks_Sentinel-2B_Descending"@@ -24,8 +30,15 @@"image": "","settings": ["HLS_L30_Nadir_BRDF_Adjusted_Reflectance",+ "HLS_Customizable_Landsat",+ "HLS_True_Color_Landsat",+ "HLS_False_Color_Landsat",+ "HLS_False_Color_Urban_Landsat",+ "HLS_False_Color_Vegetation_Landsat",+ "HLS_Shortwave_Infrared_Landsat","HLS_MGRS_Granule_Grid",- "OrbitTracks_Landsat-8_Descending"+ "OrbitTracks_Landsat-8_Descending",+ "OrbitTracks_Landsat-9_Descending"]}}diff --git a/config/default/common/config/wv.json/measurements/Land Surface Reflectance.json b/config/default/common/config/wv.json/measurements/Land Surface Reflectance.jsonindex f188e6ae3..2dd3dc215 100644--- a/config/default/common/config/wv.json/measurements/Land Surface Reflectance.json+++ b/config/default/common/config/wv.json/measurements/Land Surface Reflectance.json@@ -63,6 +63,12 @@"image": "","settings": ["HLS_S30_Nadir_BRDF_Adjusted_Reflectance",+ "HLS_Customizable_Sentinel",+ "HLS_True_Color_Sentinel",+ "HLS_False_Color_Sentinel",+ "HLS_False_Color_Urban_Sentinel",+ "HLS_False_Color_Vegetation_Sentinel",+ "HLS_Shortwave_Infrared_Sentinel","HLS_MGRS_Granule_Grid","OrbitTracks_Sentinel-2A_Descending","OrbitTracks_Sentinel-2B_Descending"@@ -75,8 +81,15 @@"image": "","settings": ["HLS_L30_Nadir_BRDF_Adjusted_Reflectance",+ "HLS_Customizable_Landsat",+ "HLS_True_Color_Landsat",+ "HLS_False_Color_Landsat",+ "HLS_False_Color_Urban_Landsat",+ "HLS_False_Color_Vegetation_Landsat",+ "HLS_Shortwave_Infrared_Landsat","HLS_MGRS_Granule_Grid",- "OrbitTracks_Landsat-8_Descending"+ "OrbitTracks_Landsat-8_Descending",+ "OrbitTracks_Landsat-9_Descending"]}}diff --git a/config/default/release/config/wv.json/sources.json b/config/default/release/config/wv.json/sources.jsonindex 49c7af1eb..09134171b 100644--- a/config/default/release/config/wv.json/sources.json+++ b/config/default/release/config/wv.json/sources.json@@ -1,25 +1,90 @@{- "sources": {- "GIBS:arctic": {- "url": "https://gibs-{a-c}.earthdata.nasa.gov/wmts/epsg3413/best/wmts.cgi"- },- "GIBS:antarctic": {- "url": "https://gibs-{a-c}.earthdata.nasa.gov/wmts/epsg3031/best/wmts.cgi"- },- "GIBS:geographic": {- "url": "https://gibs-{a-c}.earthdata.nasa.gov/wmts/epsg4326/best/wmts.cgi"- },- "GIBS:wms": {- "url": "https://gibs-{a-c}.earthdata.nasa.gov/wms/epsg4326/best/wms.cgi"- },- "GIBS:wms:arctic": {- "url": "https://gibs-{a-c}.earthdata.nasa.gov/wms/epsg3413/best/wms.cgi"- },- "GIBS:wms:antarctic": {- "url": "https://gibs-{a-c}.earthdata.nasa.gov/wms/epsg3031/best/wms.cgi"- },- "WDPA:wms": {- "url": "https://gis.unep-wcmc.org/arcgis/services/wdpa/public/MapServer/WMSServer"+ "sources": {+ "GIBS:arctic": {+ "url": "https://gibs-{a-c}.earthdata.nasa.gov/wmts/epsg3413/best/wmts.cgi"+ },+ "GIBS:antarctic": {+ "url": "https://gibs-{a-c}.earthdata.nasa.gov/wmts/epsg3031/best/wmts.cgi"+ },+ "GIBS:geographic": {+ "url": "https://gibs-{a-c}.earthdata.nasa.gov/wmts/epsg4326/best/wmts.cgi"+ },+ "GIBS:wms": {+ "url": "https://gibs-{a-c}.earthdata.nasa.gov/wms/epsg4326/best/wms.cgi"+ },+ "GIBS:wms:arctic": {+ "url": "https://gibs-{a-c}.earthdata.nasa.gov/wms/epsg3413/best/wms.cgi"+ },+ "GIBS:wms:antarctic": {+ "url": "https://gibs-{a-c}.earthdata.nasa.gov/wms/epsg3031/best/wms.cgi"+ },+ "WDPA:wms": {+ "url": "https://gis.unep-wcmc.org/arcgis/services/wdpa/public/MapServer/WMSServer"+ },+ "DDV": {+ "url": "https://kv9drwgv6l.execute-api.us-west-2.amazonaws.com/",+ "matrixSets": {+ "31.25m": {+ "id": "31.25m",+ "maxResolution": 0.5625,+ "resolutions": [+ 0.5625, 0.28125, 0.140625, 0.0703125, 0.03515625, 0.017578125,+ 0.0087890625, 0.00439453125, 0.002197265625, 0.0010986328125,+ 0.00054931640625, 0.000274658203125+ ],+ "tileSize": [512, 512],+ "tileMatrices": [+ {+ "matrixWidth": 2,+ "matrixHeight": 1+ },+ {+ "matrixWidth": 3,+ "matrixHeight": 2+ },+ {+ "matrixWidth": 5,+ "matrixHeight": 3+ },+ {+ "matrixWidth": 10,+ "matrixHeight": 5+ },+ {+ "matrixWidth": 20,+ "matrixHeight": 10+ },+ {+ "matrixWidth": 40,+ "matrixHeight": 20+ },+ {+ "matrixWidth": 80,+ "matrixHeight": 40+ },+ {+ "matrixWidth": 160,+ "matrixHeight": 80+ },+ {+ "matrixWidth": 320,+ "matrixHeight": 160+ },+ {+ "matrixWidth": 640,+ "matrixHeight": 320+ },+ {+ "matrixWidth": 1280,+ "matrixHeight": 640+ },+ {+ "matrixWidth": 2560,+ "matrixHeight": 1280+ }+ ]}+ }}-}\ No newline at end of file+ }+}diff --git a/e2e/features/dev-test-mode/dev-test-mode-test.spec.js b/e2e/features/dev-test-mode/dev-test-mode-test.spec.jsnew file mode 100644index 000000000..0790c3c62--- /dev/null+++ b/e2e/features/dev-test-mode/dev-test-mode-test.spec.js@@ -0,0 +1,21 @@+// @ts-check+const { test, expect } = require('@playwright/test')+const { skipTour } = require('../../test-utils/global-variables/querystrings')++let page++test.describe.configure({ mode: 'serial' })++test.beforeAll(async ({ browser }) => {+ page = await browser.newPage()+})++test.afterAll(async () => {+ await page.close()+})++test('Ensure that dev test mode is not on', async () => {+ await page.goto(skipTour)+ const devBlock = page.locator('#dev-block')+ await expect(devBlock).not.toBeVisible()+})diff --git a/package-lock.json b/package-lock.jsonindex c54549fee..e5e84e928 100644--- a/package-lock.json+++ b/package-lock.json@@ -18,6 +18,7 @@"@fortawesome/react-fontawesome": "^0.2.0","@khanisak/temperature-converter": "^2.0.1","@redux-devtools/extension": "^3.2.5",+ "axios": "^1.4.0","bluebird": "3.7.2","bootstrap": "^5.3.1","cachai": "^1.0.2",@@ -44,6 +45,7 @@"p-queue": "^7.3.4","proj4": "2.9.0","prop-types": "^15.8.1",+ "qs": "^6.11.2","react": "^17.0.2","react-beautiful-dnd": "^13.1.1","react-device-detect": "^2.2.3",@@ -84,7 +86,6 @@"@webpack-cli/serve": "^2.0.5","ajv": "^8.12.0","autoprefixer": "^10.4.14",- "axios": "^1.4.0","babel-loader": "^9.1.2","cheerio": "^1.0.0-rc.12","clean-webpack-plugin": "^4.0.0",diff --git a/package.json b/package.jsonindex 24a7a8e0c..b0f94c72c 100644--- a/package.json+++ b/package.json@@ -87,7 +87,6 @@"@webpack-cli/serve": "^2.0.5","ajv": "^8.12.0","autoprefixer": "^10.4.14",- "axios": "^1.4.0","babel-loader": "^9.1.2","cheerio": "^1.0.0-rc.12","clean-webpack-plugin": "^4.0.0",@@ -155,6 +154,7 @@"@fortawesome/react-fontawesome": "^0.2.0","@khanisak/temperature-converter": "^2.0.1","@redux-devtools/extension": "^3.2.5",+ "axios": "^1.4.0","bluebird": "3.7.2","bootstrap": "^5.3.1","cachai": "^1.0.2",@@ -181,6 +181,7 @@"p-queue": "^7.3.4","proj4": "2.9.0","prop-types": "^15.8.1",+ "qs": "^6.11.2","react": "^17.0.2","react-beautiful-dnd": "^13.1.1","react-device-detect": "^2.2.3",diff --git a/schemas/layer-config.json b/schemas/layer-config.jsonindex 83c57262e..72dbcb167 100644--- a/schemas/layer-config.json+++ b/schemas/layer-config.json@@ -351,7 +351,8 @@"wms","wmts","vector",- "granule"+ "granule",+ "ttiler"]},"format": {diff --git a/tasks/build-options/getVisMetadata.js b/tasks/build-options/getVisMetadata.jsindex 6c2433138..0d1ef2e43 100644--- a/tasks/build-options/getVisMetadata.js+++ b/tasks/build-options/getVisMetadata.js@@ -64,7 +64,19 @@ const layerMetadata = {}skipLayers = ['Land_Water_Map','Land_Mask',- 'World_Database_on_Protected_Areas'+ 'World_Database_on_Protected_Areas',+ 'HLS_True_Color_Sentinel',+ 'HLS_Shortwave_Infrared_Sentinel',+ 'HLS_Shortwave_Infrared_Landsat',+ 'HLS_True_Color_Landsat',+ 'HLS_False_Color_Vegetation_Landsat',+ 'HLS_False_Color_Vegetation_Sentinel',+ 'HLS_False_Color_Urban_Sentinel',+ 'HLS_False_Color_Urban_Landsat',+ 'HLS_False_Color_Sentinel',+ 'HLS_Customizable_Sentinel',+ 'HLS_Customizable_Landsat',+ 'HLS_False_Color_Landsat']// NOTE: Only using these properties at this timediff --git a/tools/generateLayergroup.js b/tools/generateLayergroup.jsindex 882c1800a..ee93d926f 100644--- a/tools/generateLayergroup.js+++ b/tools/generateLayergroup.js@@ -10,6 +10,8 @@ const measurementsArray = []// This is a set of layer IDs which we do not wish to generate (or re-generate)const EXCEPTIONS = [+ 'HLSL30_FIRMS',+ 'HLSS30_FIRMS','World_Database_on_Protected_Areas','Reference_Labels','Reference_Features',diff --git a/web/images/layers/previews/geographic/HLS_Customizable_Landsat.jpg b/web/images/layers/previews/geographic/HLS_Customizable_Landsat.jpgnew file mode 100644index 000000000..d81c0d77eBinary files /dev/null and b/web/images/layers/previews/geographic/HLS_Customizable_Landsat.jpg differdiff --git a/web/images/layers/previews/geographic/HLS_Customizable_Sentinel.jpg b/web/images/layers/previews/geographic/HLS_Customizable_Sentinel.jpgnew file mode 100644index 000000000..9a2ab98c8Binary files /dev/null and b/web/images/layers/previews/geographic/HLS_Customizable_Sentinel.jpg differdiff --git a/web/images/layers/previews/geographic/HLS_False_Color_Landsat.jpg b/web/images/layers/previews/geographic/HLS_False_Color_Landsat.jpgnew file mode 100644index 000000000..bd306afe7Binary files /dev/null and b/web/images/layers/previews/geographic/HLS_False_Color_Landsat.jpg differdiff --git a/web/images/layers/previews/geographic/HLS_False_Color_Sentinel.jpg b/web/images/layers/previews/geographic/HLS_False_Color_Sentinel.jpgnew file mode 100644index 000000000..19c6169f4Binary files /dev/null and b/web/images/layers/previews/geographic/HLS_False_Color_Sentinel.jpg differdiff --git a/web/images/layers/previews/geographic/HLS_False_Color_Urban_Landsat.jpg b/web/images/layers/previews/geographic/HLS_False_Color_Urban_Landsat.jpgnew file mode 100644index 000000000..f033a5b7bBinary files /dev/null and b/web/images/layers/previews/geographic/HLS_False_Color_Urban_Landsat.jpg differdiff --git a/web/images/layers/previews/geographic/HLS_False_Color_Urban_Sentinel.jpg b/web/images/layers/previews/geographic/HLS_False_Color_Urban_Sentinel.jpgnew file mode 100644index 000000000..bc0f02a6cBinary files /dev/null and b/web/images/layers/previews/geographic/HLS_False_Color_Urban_Sentinel.jpg differdiff --git a/web/images/layers/previews/geographic/HLS_False_Color_Vegetation_Landsat.jpg b/web/images/layers/previews/geographic/HLS_False_Color_Vegetation_Landsat.jpgnew file mode 100644index 000000000..305dc81d6Binary files /dev/null and b/web/images/layers/previews/geographic/HLS_False_Color_Vegetation_Landsat.jpg differdiff --git a/web/images/layers/previews/geographic/HLS_False_Color_Vegetation_Sentinel.jpg b/web/images/layers/previews/geographic/HLS_False_Color_Vegetation_Sentinel.jpgnew file mode 100644index 000000000..7a91215c0Binary files /dev/null and b/web/images/layers/previews/geographic/HLS_False_Color_Vegetation_Sentinel.jpg differdiff --git a/web/images/layers/previews/geographic/HLS_Shortwave_Infrared_Landsat.jpg b/web/images/layers/previews/geographic/HLS_Shortwave_Infrared_Landsat.jpgnew file mode 100644index 000000000..36700390bBinary files /dev/null and b/web/images/layers/previews/geographic/HLS_Shortwave_Infrared_Landsat.jpg differdiff --git a/web/images/layers/previews/geographic/HLS_Shortwave_Infrared_Sentinel.jpg b/web/images/layers/previews/geographic/HLS_Shortwave_Infrared_Sentinel.jpgnew file mode 100644index 000000000..aba0bc4a0Binary files /dev/null and b/web/images/layers/previews/geographic/HLS_Shortwave_Infrared_Sentinel.jpg differdiff --git a/web/images/layers/previews/geographic/HLS_True_Color_Landsat.jpg b/web/images/layers/previews/geographic/HLS_True_Color_Landsat.jpgnew file mode 100644index 000000000..543bfff53Binary files /dev/null and b/web/images/layers/previews/geographic/HLS_True_Color_Landsat.jpg differdiff --git a/web/images/layers/previews/geographic/HLS_True_Color_Sentinel.jpg b/web/images/layers/previews/geographic/HLS_True_Color_Sentinel.jpgnew file mode 100644index 000000000..ebcee0553Binary files /dev/null and b/web/images/layers/previews/geographic/HLS_True_Color_Sentinel.jpg differdiff --git a/web/js/components/layer/settings/band-selection/band-selection-menu.js b/web/js/components/layer/settings/band-selection/band-selection-menu.jsnew file mode 100644index 000000000..86c41622e--- /dev/null+++ b/web/js/components/layer/settings/band-selection/band-selection-menu.js@@ -0,0 +1,121 @@+import React, { useState } from 'react';+import { useDispatch, useSelector } from 'react-redux';+import PropTypes from 'prop-types';+import { Button, UncontrolledTooltip } from 'reactstrap';+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';+import BandsDropdown from './menu-components/band-dropdown';+import PresetOptions from './menu-components/preset-options';+import {+ updateBandCombination as updateBandCombinationAction,+ removeLayer as removeLayerAction,+} from '../../../../modules/layers/actions';+import { getActiveLayers } from '../../../../modules/layers/selectors';+import { onClose } from '../../../../modules/modal/actions';++export default function BandSelection({ layer }) {+ const dispatch = useDispatch();+ const updateBandCombination = (id, bandCombo) => { dispatch(updateBandCombinationAction(id, bandCombo, layerIndex)); };+ const removeLayer = (id) => { dispatch(removeLayerAction(id)); };+ const closeModal = () => { dispatch(onClose()); };+ const { activeLayers } = useSelector((state) => ({+ activeLayers: getActiveLayers(state, state.compare.activeString).map((layer) => layer),+ }));++ const layerIndex = activeLayers.findIndex((activeLayer) => activeLayer.id === layer.id);++ const [selectedPreset, setSelectedPreset] = useState(null);+ const [bandSelection, setBandSelection] = useState({+ r: layer.bandCombo.r,+ g: layer.bandCombo.g,+ b: layer.bandCombo.b,+ });++ const confirmSelection = () => {+ removeLayer(layer.id);+ updateBandCombination(layer.id, bandSelection);+ closeModal();+ };++ // eslint-disable-next-line no-unused-vars+ const rwbInfo = (+ <div className="band-selection-rwb-info">+ <p>Resolution = 10m/px</p>+ <p>Wavelength = 490nm</p>+ <p>Bandwidth = 65nm</p>+ </div>+ );++ const presetOptions = layer.id === 'HLS_Customizable_Landsat' ? 'landsat' : 'sentinel';++ return (+ <div className="customize-bands-container">+ <PresetOptions+ selectedPreset={selectedPreset}+ setSelectedPreset={setSelectedPreset}+ setBandSelection={setBandSelection}+ presetOptions={presetOptions}+ />+ <div className="band-selection-title-row">+ <h3>Select a band for each channel:</h3>+ <span><FontAwesomeIcon id="band-selection-title-info-icon" icon="info-circle" /></span>+ <UncontrolledTooltip+ id="band-selection-title-tooltip"+ target="band-selection-title-info-icon"+ placement="right"+ >+ Apply custom band combinations+ </UncontrolledTooltip>+ </div>++ <div className="band-selection-row">+ <p className="band-selection-color-header">R:</p>+ <BandsDropdown+ channel="r"+ bandSelection={bandSelection}+ setBandSelection={setBandSelection}+ setSelectedPreset={setSelectedPreset}+ layer={layer}+ />+ {/* {rwbInfo} */}+ </div>+ <div className="band-selection-row">+ <p className="band-selection-color-header">G:</p>+ <BandsDropdown+ channel="g"+ bandSelection={bandSelection}+ setBandSelection={setBandSelection}+ setSelectedPreset={setSelectedPreset}+ layer={layer}+ />+ {/* {rwbInfo} */}+ </div>+ <div className="band-selection-row">+ <p className="band-selection-color-header">B:</p>+ <BandsDropdown+ channel="b"+ bandSelection={bandSelection}+ setBandSelection={setBandSelection}+ setSelectedPreset={setSelectedPreset}+ layer={layer}+ />+ {/* {rwbInfo} */}+ </div>+ <div className="band-selection-button-row">+ <Button+ id="confirm-band-selection"+ aria-label="Confirm band selection"+ className="wv-button red"+ onClick={() => confirmSelection()}+ >+ <span className="button-text">+ Confirm Band Selection+ </span>+ </Button>+ </div>+ </div>+ );+}++BandSelection.propTypes = {+ layer: PropTypes.object,+};diff --git a/web/js/components/layer/settings/band-selection/band-selection-parent-info-menu.js b/web/js/components/layer/settings/band-selection/band-selection-parent-info-menu.jsnew file mode 100644index 000000000..100aa3597--- /dev/null+++ b/web/js/components/layer/settings/band-selection/band-selection-parent-info-menu.js@@ -0,0 +1,75 @@+import React from 'react';+import { useDispatch } from 'react-redux';+import { Button } from 'reactstrap';+import BandSelectionMenu from './band-selection-menu';+import { toggleCustomContent } from '../../../../modules/modal/actions';++export default function BandSelectionParentInfoMenu({ layer }) {+ const dispatch = useDispatch();+ const onCustomizeBandClick = (layer) => {+ const key = `BAND_SELECTION_MODAL_${layer.id}`;+ const title = `Customize Bands for the ${layer.title} layer`;+ dispatch(+ toggleCustomContent(key, {+ headerText: title,+ backdrop: false,+ bodyComponent: BandSelectionMenu,+ wrapClassName: 'clickable-behind-modal',+ modalClassName: 'sidebar-modal layer-settings-modal',+ timeout: 150,+ size: 'lg',+ bodyComponentProps: {+ layer,+ },+ }),+ );+ };++ const { r, g, b } = layer.bandCombo;++ return (+ <div className="customize-bands-parent-info">+ <hr />+ <p>Channels and bands assigned:</p>+ <div className="current-band-info">+ <div>+ <span className="band-color">Red:</span>+ <span className="band-name">+ Band+ {' '}+ {r}+ </span>+ </div>+ <div>+ <span className="band-color">Green:</span>+ <span className="band-name">+ Band+ {' '}+ {g}+ </span>+ </div>+ <div>+ <span className="band-color">Blue:</span>+ <span className="band-name">+ Band+ {' '}+ {b}+ </span>+ </div>+ </div>+ <div className="customize-bands-button-container">+ <Button+ id="customize-bands-button"+ aria-label="Customize band selection"+ className="wv-button red"+ onClick={() => onCustomizeBandClick(layer)}+ >+ <span className="button-text">+ Customize+ </span>+ </Button>+ </div>+ <hr />+ </div>+ );+}diff --git a/web/js/components/layer/settings/band-selection/menu-components/band-dropdown.js b/web/js/components/layer/settings/band-selection/menu-components/band-dropdown.jsnew file mode 100644index 000000000..73798519d--- /dev/null+++ b/web/js/components/layer/settings/band-selection/menu-components/band-dropdown.js@@ -0,0 +1,44 @@+import React, { useState } from 'react';+import {+ Dropdown,+ DropdownToggle,+ DropdownMenu,+ DropdownItem,+} from 'reactstrap';++export default function BandsDropdown(props) {+ const {+ channel, bandSelection, setBandSelection, layer, setSelectedPreset,+ } = props;++ const [dropdownOpen, setDropdownOpen] = useState(false);+ const toggle = () => setDropdownOpen(!dropdownOpen);+ const bandValue = bandSelection[channel] || layer.bandCombo[0];++ const sentinelBandChoices = ['B01', 'B02', 'B03', 'B04', 'B05', 'B06', 'B07', 'B08', 'B8A', 'B09', 'B10', 'B11', 'B12'];+ const landsatBandChoices = ['B01', 'B02', 'B03', 'B04', 'B05', 'B06', 'B07', 'B09', 'B10'];+ const activeBandChoices = layer.title.includes('Landsat') ? landsatBandChoices : sentinelBandChoices;++ const handleSelection = (band) => {+ setBandSelection({+ ...bandSelection,+ [channel]: band,+ });+ setSelectedPreset(null);+ };++ return (+ <Dropdown isOpen={dropdownOpen} toggle={toggle} size="sm">+ <DropdownToggle style={{ backgroundColor: '#d54e21' }} caret>+ {bandValue}+ </DropdownToggle>+ <DropdownMenu style={{ transform: 'translate3d(-30px, 0px, 0px)' }}>+ {activeBandChoices.map((band) => (+ <DropdownItem key={band} onClick={() => handleSelection(band)}>+ {band}+ </DropdownItem>+ ))}+ </DropdownMenu>+ </Dropdown>+ );+}diff --git a/web/js/components/layer/settings/band-selection/menu-components/preset-options.js b/web/js/components/layer/settings/band-selection/menu-components/preset-options.jsnew file mode 100644index 000000000..36ecb54f9--- /dev/null+++ b/web/js/components/layer/settings/band-selection/menu-components/preset-options.js@@ -0,0 +1,132 @@+import React from 'react';+import {+ Card, CardImg, CardBody, CardTitle, CardText,+} from 'reactstrap';++const imgPath = 'images/layers/previews/geographic/';++const landsatPresets = [+ {+ id: 'HLS_True_Color_Landsat',+ title: 'True Color',+ r: 'B04',+ g: 'B03',+ b: 'B02',+ img: 'HLS_True_Color_Landsat.jpg',+ },+ {+ id: 'HLS_False_Color_Landsat',+ title: 'False Color',+ r: 'B05',+ g: 'B04',+ b: 'B03',+ img: 'HLS_False_Color_Landsat.jpg',+ },+ {+ id: 'HLS_False_Color_Urban_Landsat',+ title: 'False Color (Urban)',+ r: 'B07',+ g: 'B06',+ b: 'B04',+ img: 'HLS_False_Color_Urban_Landsat.jpg',+ },+ {+ id: 'FalseColorVegetation_landsat',+ title: 'False Color (Vegetation)',+ r: 'B06',+ g: 'B05',+ b: 'B04',+ img: 'HLS_False_Color_Vegetation_Landsat.jpg',+ },+ {+ id: 'HLS_Shortwave_Infrared_Landsat.jpg',+ title: 'Shortwave Infrared',+ r: 'B07',+ g: 'B05',+ b: 'B04',+ img: 'HLS_Shortwave_Infrared_Landsat.jpg',+ },+];++const sentinelPresets = [+ {+ id: 'HLS_True_Color_Sentinel',+ title: 'True Color',+ r: 'B04',+ g: 'B03',+ b: 'B02',+ img: 'HLS_True_Color_Sentinel.jpg',+ },+ {+ id: 'HLS_False_Color_Sentinel',+ title: 'False Color',+ r: 'B08',+ g: 'B04',+ b: 'B03',+ img: 'HLS_False_Color_Sentinel.jpg',+ },+ {+ id: 'HLS_False_Color_Urban_Sentinel',+ title: 'False Color (Urban)',+ r: 'B12',+ g: 'B11',+ b: 'B4',+ img: 'HLS_False_Color_Urban_Sentinel.jpg',+ },+ {+ id: 'HLS_False_Color_Vegetation_Sentinel',+ title: 'False Color (Vegetation)',+ r: 'B11',+ g: 'B8A',+ b: 'B04',+ img: 'HLS_False_Color_Vegetation_Sentinel.jpg',+ },+ {+ id: 'HLS_Shortwave_Infrared_Sentinel',+ title: 'Shortwave Infrared',+ r: 'B12',+ g: 'B8A',+ b: 'B04',+ img: 'HLS_Shortwave_Infrared_Sentinel.jpg',+ },+];++export default function PresetOptions(props) {+ const {+ setBandSelection, selectedPreset, setSelectedPreset, presetOptions,+ } = props;+ const handlePresetSelect = (preset) => {+ setSelectedPreset(preset);+ setBandSelection({+ r: preset.r,+ g: preset.g,+ b: preset.b,+ });+ };++ const presets = presetOptions === 'landsat' ? landsatPresets : sentinelPresets;++ return (+ <div className="band-selection-presets-container">+ <div className="band-selection-presets-title-row">+ <p>Other selectable presets (optional):</p>+ </div>+ <div className="band-selection-presets-scrollable">+ {presets.map((preset) => (+ <Card+ key={preset.id}+ onClick={() => handlePresetSelect(preset)}+ className={`band-selection-preset-card ${preset.id === selectedPreset?.id ? 'selected-preset' : ''}`}+ >+ <CardImg top className="band-selection-preset-image" src={imgPath + preset.img} alt={preset.title} />+ <CardBody>+ <CardTitle tag="h5">{preset.title}</CardTitle>+ <CardText>{`R: ${preset.r}, G: ${preset.g}, B: ${preset.b}`}</CardText>+ </CardBody>+ </Card>+ ))}+ </div>++ </div>+ );+}diff --git a/web/js/components/layer/settings/layer-settings.js b/web/js/components/layer/settings/layer-settings.jsindex b4f182ffb..53be5256b 100644--- a/web/js/components/layer/settings/layer-settings.js+++ b/web/js/components/layer/settings/layer-settings.js@@ -8,6 +8,7 @@ import { connect } from 'react-redux';import Opacity from './opacity';import Palette from './palette';+import BandSelection from './band-selection/band-selection-parent-info-menu';import AssociatedLayers from './associated-layers-toggle';import VectorStyle from './vector-style';import PaletteThreshold from './palette-threshold';@@ -340,6 +341,7 @@ class LayerSettings extends React.Component {} = this.props;const hasAssociatedLayers = layer.associatedLayers && layer.associatedLayers.length;const hasTracks = layer.orbitTracks && layer.orbitTracks.length;+ const ttilerLayer = layer.id === 'HLS_Customizable_Sentinel' || layer.id === 'HLS_Customizable_Landsat';const layerGroup = layer.layergroup;if (layer.type !== 'vector') {@@ -362,6 +364,7 @@ class LayerSettings extends React.Component {/>{this.renderGranuleSettings()}{renderCustomizations}+ {ttilerLayer && <BandSelection layer={layer} />}{(hasAssociatedLayers || hasTracks) && <AssociatedLayers layer={layer} />}</>);@@ -469,6 +472,7 @@ LayerSettings.propTypes = {globalTemperatureUnit: PropTypes.string,groupName: PropTypes.string,layer: PropTypes.object,+ onCustomizeBandClick: PropTypes.func,palettedAllowed: PropTypes.bool,paletteOrder: PropTypes.array,palettesTranslate: PropTypes.func,diff --git a/web/js/map/layerbuilder.js b/web/js/map/layerbuilder.jsindex 7dda8a2f2..cbc84770c 100644--- a/web/js/map/layerbuilder.js+++ b/web/js/map/layerbuilder.js@@ -3,11 +3,15 @@import OlTileGridWMTS from 'ol/tilegrid/WMTS';import OlSourceWMTS from 'ol/source/WMTS';import OlSourceTileWMS from 'ol/source/TileWMS';+import OlSourceXYZ from 'ol/source/XYZ';import OlLayerGroup from 'ol/layer/Group';import OlLayerTile from 'ol/layer/Tile';import TileState from 'ol/TileState';+import { get } from 'ol/proj';import OlTileGridTileGrid from 'ol/tilegrid/TileGrid';import MVT from 'ol/format/MVT';+import axios from 'axios';+import qs from 'qs';import LayerVectorTile from 'ol/layer/VectorTile';import SourceVectorTile from 'ol/source/VectorTile';import ImageLayer from 'ol/layer/Image';@@ -174,7 +178,7 @@ export default function mapLayerBuilder(config, cache, store) {let layer = cache.getItem(key);const isGranule = type === 'granule';- if (!layer || isGranule) {+ if (!layer || isGranule || def.type === 'ttiler') {if (!date) date = options.date || getSelectedDate(state);const cacheOptions = getCacheOptions(period, date);const attributes = {@@ -190,10 +194,10 @@ export default function mapLayerBuilder(config, cache, store) {def = lodashCloneDeep(def);lodashMerge(def, projections[proj.id]);if (breakPointLayer) def = mergeBreakpointLayerAttributes(def, proj.id);-const isDataDownloadTabActive = activeTab === 'download';const wrapDefined = wrapadjacentdays === true || wrapX;const wrapLayer = proj.id === 'geographic' && !isDataDownloadTabActive && wrapDefined;+if (!isGranule) {switch (def.type) {case 'wmts':@@ -205,12 +209,15 @@ export default function mapLayerBuilder(config, cache, store) {case 'wms':layer = getLayer(createLayerWMS, def, options, attributes, wrapLayer);break;+ case 'ttiler':+ layer = await getLayer(createTtilerLayer, def, options, attributes, wrapLayer);+ break;default:throw new Error(`Unknown layer type: ${type}`);}layer.wv = attributes;cache.setItem(key, layer, cacheOptions);- layer.setVisible(false);+ if (def.type !== 'ttiler') layer.setVisible(false);} else {layer = await getGranuleLayer(def, attributes, options);}@@ -729,6 +736,121 @@ export default function mapLayerBuilder(config, cache, store) {return layer;};+ const registerSearch = async (def, options, state) => {+ const { date } = state;+ let requestDate;+ if (options.group === 'activeB') {+ requestDate = date.selectedB;+ } else {+ requestDate = date.selected;+ }++ const formattedDate = util.toISOStringSeconds(requestDate).slice(0, 10);+ const layerID = def.id;+ const BASE_URL = 'https://d1nzvsko7rbono.cloudfront.net';+ const { r, g, b } = def.bandCombo;+ const bandCombo = [r, g, b];++ const landsatLayers = [+ 'HLS_Customizable_Landsat',+ 'HLS_True_Color_Landsat',+ 'HLS_False_Color_Landsat',+ 'HLS_False_Color_Urban_Landsat',+ 'HLS_False_Color_Vegetation_Landsat',+ 'HLS_Shortwave_Infrared_Landsat',+ ];++ const collectionID = landsatLayers.includes(layerID) ? 'HLSL30' : 'HLSS30';++ const temporalRange = [`${formattedDate}T00:00:00Z`, `${formattedDate}T23:59:59Z`];++ const collectionsFilter = {+ op: '=',+ args: [{ property: 'collection' }, collectionID],+ };++ const temporalFilter = {+ op: 't_intersects',+ args: [{ property: 'datetime' }, { interval: temporalRange }],+ };++ const searchBody = {+ 'filter-lang': 'cql2-json',+ context: 'on',+ filter: {+ op: 'and',+ args: [+ collectionsFilter,+ temporalFilter,+ ],+ },+ };++ const mosaicResponse = await axios+ .post(`${BASE_URL}/mosaic/register`, searchBody)+ .then((res) => res.data);++ const tilesHref = mosaicResponse.links.find(+ (link) => link.rel === 'tilejson',+ ).href;++ const params = {+ post_process: 'swir',+ assets: bandCombo,+ };++ const queryString = qs.stringify(params, { arrayFormat: 'repeat' });++ const tilejsonResponse = await axios+ .get(tilesHref, {+ params: new URLSearchParams(queryString),+ })+ .then((res) => res.data);++ const { name } = tilejsonResponse;++ return name;+ };++ const createTtilerLayer = async (def, options, day, state) => {+ const { proj: { selected }, date } = state;+ const { maxExtent, crs } = selected;+ const { r, g, b } = def.bandCombo;++ const source = config.sources[def.source];++ const searchID = await registerSearch(def, options, state);++ const tileUrlFunction = (tileCoord) => {+ const z = tileCoord[0] - 1;+ const x = tileCoord[1];+ const y = tileCoord[2];++ const urlParams = `mosaic/tiles/${searchID}/WGS1984Quad/${z}/${x}/${y}@1x?post_process=swir&assets=${r}&assets=${g}&assets=${b}`;+ return source.url + urlParams;+ };++ const xyzSourceOptions = {+ crossOrigin: 'anonymous',+ projection: get(crs),+ tileUrlFunction,+ };++ const xyzSource = new OlSourceXYZ(xyzSourceOptions);++ const requestDate = util.toISOStringSeconds(util.roundTimeOneMinute(date.selected)).slice(0, 10);+ const className = `${def.id} ${requestDate}`;++ const layer = new OlLayerTile({+ source: xyzSource,+ className,+ minZoom: 7,+ extent: maxExtent,+ });++ return layer;+ };+return {layerKey,createLayer,diff --git a/web/js/mapUI/components/dev-test-mode/dev-console-test.js b/web/js/mapUI/components/dev-test-mode/dev-console-test.jsnew file mode 100644index 000000000..59d885438--- /dev/null+++ b/web/js/mapUI/components/dev-test-mode/dev-console-test.js@@ -0,0 +1,44 @@+import React from 'react';+import { useSelector, useDispatch } from 'react-redux';+import { Button, UncontrolledTooltip } from 'reactstrap';+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';++function ConsoleTest () {+ // eslint-disable-next-line no-unused-vars+ const dispatch = useDispatch();+ const {+ map,+ } = useSelector((state) => ({+ map: state.map.ui.selected,+ }));++ const consoleResponse = () => {+ console.log(map);+ };+++ return (+ <div className="d-flex flex-column justify-content-center align-items-center w-100 mt-3">+ <div className="d-flex flex-row justify-content-center align-items-center">+ <h5 className="h5 fw-bold d-inline-block me-1">Console Test Mode</h5>+ <span><FontAwesomeIcon id="console-test-info-icon" icon="info-circle" className="pb-2" /></span>+ <UncontrolledTooltip+ id="console-test-tooltip"+ target="console-test-info-icon"+ placement="right"+ >+ Console any response. See the ConsoleTest component+ </UncontrolledTooltip>+ </div>+ <span className="border-top border-white-50 mb-2 w-100" />+ <Button+ style={{ backgroundColor: '#d54e21' }}+ onClick={consoleResponse}+ >+ Console test+ </Button>+ </div>+ );+}++export default ConsoleTest;diff --git a/web/js/mapUI/components/dev-test-mode/dev-preset-console-commands.js b/web/js/mapUI/components/dev-test-mode/dev-preset-console-commands.jsnew file mode 100644index 000000000..e850adcce--- /dev/null+++ b/web/js/mapUI/components/dev-test-mode/dev-preset-console-commands.js@@ -0,0 +1,88 @@+import React from 'react';+import { useSelector } from 'react-redux';+import { Button, UncontrolledTooltip } from 'reactstrap';+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';+import { transformExtent } from 'ol/proj';+import { getActiveLayers } from '../../../modules/layers/selectors';++function PresetConsoleCommands () {+ const {+ map,+ activeLayers,+ parameters,+ } = useSelector((state) => ({+ map: state.map.ui.selected,+ activeLayers: getActiveLayers(state, state.compare.activeString).map((layer) => layer),+ parameters: state.parameters,+ }));++ const getZoom = () => {+ const zoom = map.getView().getZoom();+ console.log(zoom);+ };++ const getVisibleExtent = () => {+ const extent = map.getView().calculateExtent(map.getSize());+ console.log('------ESPG:4326------');+ console.table(extent);+ const extentLonLat = transformExtent(extent, 'EPSG:4326', 'EPSG:3857');+ console.log('------ESPG:3857------');+ console.table(extentLonLat);+ };++ const returnActiveLayers = () => {+ console.log(activeLayers);+ };++ const getParameters = () => {+ console.log(parameters);+ };+++ return (+ <div className="d-flex flex-column justify-content-center align-items-center w-100 mt-3">+ <div className="d-flex flex-row justify-content-center align-items-center">+ <h5 className="h5 fw-bold d-inline-block me-1">Preset Console Commands</h5>+ <span><FontAwesomeIcon id="console-test-info-icon" icon="info-circle" className="pb-2" /></span>+ <UncontrolledTooltip+ id="console-test-tooltip"+ target="console-test-info-icon"+ placement="right"+ >+ Print preset commands to the console.+ </UncontrolledTooltip>+ </div>+ <span className="border-top border-white-50 mb-2 w-100" />+ <div className="d-flex flex-wrap justify-content-between">+ <Button+ className="mb-3"+ style={{ backgroundColor: '#d54e21', width: '48%' }}+ onClick={getZoom}+ >+ Get Zoom+ </Button>+ <Button+ className="mb-3"+ style={{ backgroundColor: '#d54e21', width: '48%' }}+ onClick={getVisibleExtent}+ >+ Get Visible Extent+ </Button>+ <Button+ style={{ backgroundColor: '#d54e21', width: '48%' }}+ onClick={returnActiveLayers}+ >+ Get Active Layers+ </Button>+ <Button+ style={{ backgroundColor: '#d54e21', width: '48%' }}+ onClick={getParameters}+ >+ Get Parameters+ </Button>+ </div>+ </div>+ );+}++export default PresetConsoleCommands;diff --git a/web/js/mapUI/components/dev-test-mode/dev-test-button.js b/web/js/mapUI/components/dev-test-mode/dev-test-button.jsnew file mode 100644index 000000000..7dce9eb63--- /dev/null+++ b/web/js/mapUI/components/dev-test-mode/dev-test-button.js@@ -0,0 +1,40 @@+import React from 'react';+import { useDispatch } from 'react-redux';+import { Button } from 'reactstrap';+import { toggleCustomContent } from '../../../modules/modal/actions';+import DevTestModal from './dev-test-modal';++function DevTestButton () {+ const dispatch = useDispatch();+ const openTestMenu = () => {+ const key = 'DEV_TEST_MENU';+ const title = 'Dev Test Menu';+ dispatch(+ toggleCustomContent(key, {+ headerText: title,+ backdrop: false,+ bodyComponent: DevTestModal,+ wrapClassName: 'clickable-behind-modal',+ modalClassName: 'sidebar-modal layer-settings-modal',+ timeout: 150,+ size: 'lg',+ bodyComponentProps: {+ },+ }),+ );+ };++ return (+ <div id="dev-block" className="d-flex justify-content-center">+ <Button+ onClick={openTestMenu}+ color="primary"+ style={{ zIndex: '999' }}+ >+ Open Test Menu+ </Button>+ </div>+ );+}++export default DevTestButton;diff --git a/web/js/mapUI/components/dev-test-mode/dev-test-modal.js b/web/js/mapUI/components/dev-test-mode/dev-test-modal.jsnew file mode 100644index 000000000..702159ea6--- /dev/null+++ b/web/js/mapUI/components/dev-test-mode/dev-test-modal.js@@ -0,0 +1,20 @@+import React from 'react';+// eslint-disable-next-line no-unused-vars+import PixelTestMode from './pixel-test-mode/dev-pixel-test';+import ConsoleTestMode from './dev-console-test';+import PresetConsoleCommands from './dev-preset-console-commands';+// eslint-disable-next-line no-unused-vars+import FindOrbitTracksTestMode from './find-orbit-tracks-mode/dev-find-orbit-tracks-mode';++function DevTestModal() {+ return (+ <div id="dev-block" className="d-flex flex-column justify-content-center align-items-center">+ <ConsoleTestMode />+ <PresetConsoleCommands />+ {/* <PixelTestMode /> */}+ {/* <FindOrbitTracksTestMode /> */}+ </div>+ );+}++export default DevTestModal;diff --git a/web/js/mapUI/components/dev-test-mode/find-orbit-tracks-mode/dev-find-orbit-tracks-mode.js b/web/js/mapUI/components/dev-test-mode/find-orbit-tracks-mode/dev-find-orbit-tracks-mode.jsnew file mode 100644index 000000000..09f177963--- /dev/null+++ b/web/js/mapUI/components/dev-test-mode/find-orbit-tracks-mode/dev-find-orbit-tracks-mode.js@@ -0,0 +1,222 @@+import React, { useState, useEffect } from 'react';+import { useSelector, useDispatch } from 'react-redux';+import { getIntersection, getArea, isEmpty } from 'ol/extent';+import {+ Button, ButtonGroup, UncontrolledTooltip, FormGroup, Label, Badge, Spinner,+} from 'reactstrap';+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';+import { transformExtent } from 'ol/proj';+import DropdownSelector from '../pixel-test-mode/tile-image-test-dropdown-selection';+import { selectDate as selectDateAction } from '../../../../modules/date/actions';+import { getActiveLayers } from '../../../../modules/layers/selectors';+import { formatReduxDailyDate, getOrbitalDates } from '../../kiosk/tile-measurement/utils/date-util';+import fetchWMSImageExperimental from '../utils/image-api-request-experimental';+import calculatePixels from '../../kiosk/tile-measurement/utils/calculate-pixels';+import { layerPixelData } from '../../kiosk/tile-measurement/utils/layer-data-eic';+import usePrevious from '../../../../util/customHooks';++function FindOrbitTracksMode () {+ const dispatch = useDispatch();+ const selectDate = (date) => { dispatch(selectDateAction(date)); };+ const {+ currentExtent,+ orbitalLayers,+ selectedDate,+ latestDate,+ zoom,+ } = useSelector((state) => ({+ currentExtent: state.map.ui.selected.getView().calculateExtent(state.map.ui.selected.getSize()),+ orbitalLayers: getActiveLayers(state, state.compare.activeString).filter((layer) => layer.layergroup === 'Orbital Track'),+ selectedDate: state.date.selected,+ latestDate: state.date.appNow,+ zoom: state.map.ui.selected.getView().getZoom(),+ }));++ const prevDate = usePrevious(selectedDate);++ useEffect(() => {+ if (selectedDate !== prevDate && dateFound !== null) {+ setDateFound(null);+ }+ });++ const placeHolderLayerSelection = { id: 'Select Layer', period: 'daily' };+ const [layerSelection, setLayerSelection] = useState(placeHolderLayerSelection);+ const [searchMethod, setSearchMethod] = useState(0);+ const [dateFound, setDateFound] = useState(null);+ const [isLoading, setIsLoading] = useState(false);++ const buttonDisabled = layerSelection.id === 'Select Layer' || searchMethod === 0 || zoom < 7 || isLoading;++ const moveToDate = () => {+ const parts = dateFound.split('-');+ const year = parts[0];+ const month = parts[1] - 1;+ const day = parts[2];++ const date = new Date(year, month, day, 12, 0, 0);+ selectDate(date);+ };++ const verifyExtent = () => {+ // This is a very loose measurement.. Should find a better way to find values...+ const unitedStatesExtent = [-125.0799167388867, 22.176358212699427, -62.489596269417106, 57.01542814447728];+ const intersection = getIntersection(unitedStatesExtent, currentExtent);+ const intersectionArea = getArea(intersection);+ if (isEmpty(intersection)) {+ console.log('No intersection');+ return false;+ }+ const mapViewArea = getArea(currentExtent);+ const percentOfMapView = (intersectionArea / mapViewArea) * 100;+ console.log('percentOfMapView', percentOfMapView);+ const extentQualifies = percentOfMapView > 25;+ if (!extentQualifies) console.log(`Only ${percentOfMapView}% of map extent within United States.`);+ return extentQualifies;+ };++ const getOrbitalDateRange = () => {+ const formattedSelectedDate = formatReduxDailyDate(selectedDate);+ const formattedLatestDate = formatReduxDailyDate(latestDate);+ const dateRange = getOrbitalDates(formattedSelectedDate, formattedLatestDate, searchMethod);+ console.log(dateRange);+ return dateRange;+ };++ const findOrbitalImagery = async () => {+ setIsLoading(true);+ const verifyQuery = verifyExtent();+ if (!verifyQuery) {+ setIsLoading(false);+ return;+ }+ const dateRange = getOrbitalDateRange();+ for (let i = 0; i < dateRange.length; i += 1) {+ const date = dateRange[i];+ // eslint-disable-next-line no-await-in-loop+ const imageryRequest = await makeMeasurementRequest(date);+ if (imageryRequest === 100 || !imageryRequest) {+ console.log('No imagery found for ', date);+ } else {+ setIsLoading(false);+ console.log('Imagery found for ', date, ' with ', imageryRequest, '% black pixels');+ return setDateFound(date);+ }+ }+ setIsLoading(false);+ };++ const makeMeasurementRequest = async (date) => {+ const mercatorExtent = transformExtent(currentExtent, 'EPSG:4326', 'EPSG:3857');+ try {+ const wmsImage = await fetchWMSImageExperimental(layerSelection.id, date, mercatorExtent);+ // Create an image and handle its loading and error events+ const img = new Image();+ // Create and return a Promise+ return new Promise((resolve, reject) => {+ img.onload = async () => {+ // Process the loaded image here+ const blackPixelRatio = parseFloat((await calculatePixels(wmsImage) * 100).toFixed(2));+ // eslint-disable-next-line no-unsafe-optional-chaining+ const currentThreshold = layerPixelData?.[layerSelection?.id]?.threshold * 100 ?? null;+ const pixelMessage = `${blackPixelRatio}% of pixels are black for ${layerSelection.id} on ${date}... `;+ const thresholdMessage = currentThreshold ? `The current threshold for ${layerSelection.id} is ${currentThreshold}%` : `There is no current threshold for ${layerSelection.id} ...`;+ console.log(pixelMessage + thresholdMessage);+ // Resolve the Promise with the result+ resolve(blackPixelRatio);+ };+ img.onerror = (error) => {+ console.error(`No image available for ${layerSelection.id} on ${date}: `, error);+ // Reject the Promise with the error+ reject(error);+ };+ // Try to load the image+ img.src = wmsImage;+ });+ } catch (error) {+ console.error(`No image available for ${layerSelection.id} on ${date}: `, error);+ }+ };++ const orangeStyle = { backgroundColor: '#d54e21' };++ return (+ <div className="d-flex flex-column justify-content-center align-items-center mt-3">+ <div className="d-flex flex-row justify-content-center align-items-center">+ <h5 className="h5 fw-bold me-1">Orbit Track Test Mode</h5>+ <span><FontAwesomeIcon id="orbit-track-test-info-icon" icon="info-circle" className="pb-2" /></span>+ <UncontrolledTooltip+ id="orbit-track-test-tooltip"+ target="orbit-track-test-info-icon"+ placement="right"+ >+ Find nearest imagery date with orbit tracks for current extent+ </UncontrolledTooltip>+ </div>+ <span className="border-top border-white-50 mb-2 w-100" />+ <div className="d-flex flex-row justify-content-center align-items-center mb-2">+ <h5>Minimum Zoom: </h5>+ <Badge color="primary" className="ms-2 me-4 px-3 py-2 fs-6">7</Badge>+ <h5>Current Zoom: </h5>+ <Badge color={zoom < 7 ? 'danger' : 'success'} className="ms-2 me-4 px-3 py-2 fs-6">{zoom.toFixed(2)}</Badge>+ </div>+ <DropdownSelector+ activeLayers={orbitalLayers}+ layerSelection={layerSelection}+ setLayerSelection={setLayerSelection}+ />+ <FormGroup className="d-flex justify-content-center">+ <Label for="searchMethod"><h4>Select a date search method</h4></Label>+ </FormGroup>+ <FormGroup className="d-flex justify-content-center">+ <ButtonGroup>+ <Button+ color="primary"+ outline+ onClick={() => setSearchMethod(1)}+ active={searchMethod === 1}+ >+ Forwards+ </Button>+ <Button+ color="primary"+ outline+ onClick={() => setSearchMethod(2)}+ active={searchMethod === 2}+ >+ Backwards+ </Button>+ <Button+ color="primary"+ outline+ onClick={() => setSearchMethod(3)}+ active={searchMethod === 3}+ >+ Both+ </Button>+ </ButtonGroup>+ </FormGroup>+ <Button+ style={orangeStyle}+ onClick={findOrbitalImagery}+ className="mb-3"+ disabled={buttonDisabled}+ >+ {isLoading ? <Spinner size="sm" color="light" /> : 'Search For Imagery'}+ </Button>+ <div className="d-flex flex-row justify-content-center align-items-center mb-2">+ <h5>Date Found:</h5>+ <Badge color="primary" className="ms-2 me-4 px-3 py-2 fs-6">{dateFound || 'No date found'}</Badge>+ <Button+ onClick={moveToDate}+ disabled={!dateFound}+ style={orangeStyle}+ >+ {isLoading ? <Spinner size="sm" color="light" /> : 'Take Me There'}+ </Button>+ </div>+ </div>+ );+}++export default FindOrbitTracksMode;diff --git a/web/js/mapUI/components/kiosk/tile-measurement/tile-image-test-mode/tile-image-test-mode.js b/web/js/mapUI/components/dev-test-mode/pixel-test-mode/dev-pixel-test.jssimilarity index 50%rename from web/js/mapUI/components/kiosk/tile-measurement/tile-image-test-mode/tile-image-test-mode.jsrename to web/js/mapUI/components/dev-test-mode/pixel-test-mode/dev-pixel-test.jsindex 1b7ec33f8..f541a8a2d 100644--- a/web/js/mapUI/components/kiosk/tile-measurement/tile-image-test-mode/tile-image-test-mode.js+++ b/web/js/mapUI/components/dev-test-mode/pixel-test-mode/dev-pixel-test.js@@ -1,29 +1,32 @@import React, { useState } from 'react';import { useSelector } from 'react-redux';-import { Button } from 'reactstrap';-import { getActiveLayers } from '../../../../../modules/layers/selectors';-import fetchWMSImage from '../utils/image-api-request';-import calculatePixels from '../utils/calculate-pixels';-import { layerPixelData } from '../utils/layer-data-eic';+import { Button, UncontrolledTooltip } from 'reactstrap';+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';+import { transformExtent } from 'ol/proj';+import { getActiveLayers } from '../../../../modules/layers/selectors';+import fetchWMSImageExperimental from '../utils/image-api-request-experimental';+import calculatePixels from '../../kiosk/tile-measurement/utils/calculate-pixels';+import { layerPixelData } from '../../kiosk/tile-measurement/utils/layer-data-eic';+import { formatReduxDailyDate, formatReduxSubdailyDate } from '../../kiosk/tile-measurement/utils/date-util';+import Switch from '../../../../components/util/switch';import DropdownSelector from './tile-image-test-dropdown-selection';-import { formatReduxDailyDate, formatReduxSubdailyDate } from '../utils/date-util';-// Use this component to test the black pixel ratio of a single image-// You will need to set the the 'tileImageTestMode' state to true in mapUI-// Remember to set it back to false when you are done testing--function TileImagePixelTest() {+function PixelTestMode () {const {activeLayers,selectedDate,+ currentExtent,} = useSelector((state) => ({activeLayers: getActiveLayers(state, state.compare.activeString).map((layer) => layer),selectedDate: state.date.selected,+ currentExtent: state.map.ui.selected.getView().calculateExtent(state.map.ui.selected.getSize()),}));const placeHolderLayerSelection = { id: 'Select Layer', period: 'daily' };const [layerSelection, setLayerSelection] = useState(placeHolderLayerSelection);+ const [visualMapExtentSetting, setVisualMapExtentSetting] = useState(false);+const buttonDisabled = layerSelection.id === 'Select Layer';const formatDate = () => {@@ -35,8 +38,10 @@ function TileImagePixelTest() {const makeMeasurementRequest = async () => {const formattedDate = formatDate();+ let mercatorExtent;+ if (visualMapExtentSetting) mercatorExtent = transformExtent(currentExtent, 'EPSG:4326', 'EPSG:3857');try {- const wmsImage = await fetchWMSImage(layerSelection.id, formattedDate, true);+ const wmsImage = await fetchWMSImageExperimental(layerSelection.id, formattedDate, mercatorExtent);// Create an image and handle its loading and error eventsconst img = new Image();@@ -64,21 +69,44 @@ function TileImagePixelTest() {}};-return (- <div id="dev-block" className="d-flex justify-content-center">+ <div className="d-flex flex-column justify-content-center align-items-center mt-3">+ <div className="d-flex flex-row justify-content-center align-items-center">+ <h5 className="h5 fw-bold me-1">Pixel Test Mode</h5>+ <span><FontAwesomeIcon id="pixel-test-info-icon" icon="info-circle" className="pb-2" /></span>+ <UncontrolledTooltip+ id="pixel-test-tooltip"+ target="pixel-test-info-icon"+ placement="right"+ >+ Used to test the ratio of black pixels in an image tile. See PixelTestMode component.+ </UncontrolledTooltip>+ </div>+ <span className="border-top border-white-50 mb-2 w-100" /><Buttoncolor="primary"- style={{ zIndex: '999' }}disabled={buttonDisabled}onClick={makeMeasurementRequest}+ className="mb-3">Pixel Test</Button>- <DropdownSelector activeLayers={activeLayers} layerSelection={layerSelection} setLayerSelection={setLayerSelection} />-+ <DropdownSelector+ activeLayers={activeLayers}+ layerSelection={layerSelection}+ setLayerSelection={setLayerSelection}+ />+ <Switch+ id="visual-extent-bbox-switch"+ key="visual-extent-bbox-switch"+ label="Use current visual extent as bounding box"+ active={visualMapExtentSetting}+ toggle={() => {+ setVisualMapExtentSetting(!visualMapExtentSetting);+ }}+ /></div>);}-export default TileImagePixelTest;+export default PixelTestMode;diff --git a/web/js/mapUI/components/kiosk/tile-measurement/tile-image-test-mode/tile-image-test-dropdown-selection.js b/web/js/mapUI/components/dev-test-mode/pixel-test-mode/tile-image-test-dropdown-selection.jssimilarity index 85%rename from web/js/mapUI/components/kiosk/tile-measurement/tile-image-test-mode/tile-image-test-dropdown-selection.jsrename to web/js/mapUI/components/dev-test-mode/pixel-test-mode/tile-image-test-dropdown-selection.jsindex 79e3678b4..07050f824 100644--- a/web/js/mapUI/components/kiosk/tile-measurement/tile-image-test-mode/tile-image-test-dropdown-selection.js+++ b/web/js/mapUI/components/dev-test-mode/pixel-test-mode/tile-image-test-dropdown-selection.js@@ -16,13 +16,13 @@ function TileImageTestModeDropdown({ activeLayers, layerSelection, setLayerSelec};return (- <Dropdown isOpen={dropdownOpen} toggle={toggle}>+ <Dropdown isOpen={dropdownOpen} toggle={toggle} className="mb-3 mt-2"><DropdownToggle style={{ backgroundColor: '#d54e21' }} caret>{layerSelection.id}</DropdownToggle>- <DropdownMenu style={{ transform: 'translate3d(-30px, 0px, 0px)' }}>+ <DropdownMenu style={{ transform: 'translate3d(-30px, 0px, 0px)' }} className="bg-dark">{activeLayers.map((layer) => (- <DropdownItem key={layer.id} onClick={() => handleSelection(layer)}>+ <DropdownItem key={layer.id} onClick={() => handleSelection(layer)} className="text-white bg-dark">{layer.id}</DropdownItem>))}diff --git a/web/js/mapUI/components/dev-test-mode/utils/image-api-request-experimental.js b/web/js/mapUI/components/dev-test-mode/utils/image-api-request-experimental.jsnew file mode 100644index 000000000..3828d7208--- /dev/null+++ b/web/js/mapUI/components/dev-test-mode/utils/image-api-request-experimental.js@@ -0,0 +1,46 @@+/* eslint-disable no-unused-vars */+import axios from 'axios';+import { saveAs } from 'file-saver';++export default async function fetchWMSImage(layer, date, extent) {+ const baseUrl = 'https://gibs.earthdata.nasa.gov/wms/epsg4326/best/wms.cgi';+ const fullExtentBBox = '-20037508.34,-20048966.1,20037508.34,20048966.1';+ let boundingBox;+ if (extent) {+ boundingBox = `${extent[0]},${extent[1]},${extent[2]},${extent[3]}`;+ } else {+ boundingBox = fullExtentBBox;+ }++ const params = {+ version: '1.3.0',+ service: 'WMS',+ request: 'GetMap',+ format: 'image/png',+ STYLE: 'default',+ bbox: boundingBox,+ CRS: 'EPSG:3857',+ HEIGHT: '256',+ WIDTH: '256',+ TIME: date,+ layers: layer,+ };++ try {+ const response = await axios.get(baseUrl, { params, responseType: 'arraybuffer' });+ // Convert the response data to a Blob which can be used as image src+ const blob = new Blob([response.data], { type: response.headers['content-type'] });+ const imageSrc = URL.createObjectURL(blob);++ // Save the file for debugging purposes in test mode+ // This should open image in a seperate tab in the browser, may have to allow popups++ // const file = new Blob([response.data], { type: 'image/png' });+ // saveAs(file, `${layer}.png`);++ return imageSrc;+ } catch (error) {+ console.error(error);+ return null;+ }+}diff --git a/web/js/mapUI/components/kiosk/tile-measurement/utils/date-util.js b/web/js/mapUI/components/kiosk/tile-measurement/utils/date-util.jsindex 642947e12..6889aea5f 100644--- a/web/js/mapUI/components/kiosk/tile-measurement/utils/date-util.js+++ b/web/js/mapUI/components/kiosk/tile-measurement/utils/date-util.js@@ -95,3 +95,79 @@ export function formatReduxSubdailyDate(selectedDate) {return `${year}-${month}-${day}T${hour}:${minute}:00Z`;}++export function getOrbitalDates (selectedDate, latestDate, searchMethod) {+ if (searchMethod === 1) {+ return getOrbitalDatesForwards(selectedDate, latestDate);+ } if (searchMethod === 2) {+ return getOrbitalDatesBackwards(selectedDate);+ } if (searchMethod === 3) {+ return getOrbitalDatesForwardsAndBackwards(selectedDate, latestDate);+ }+}++export function getOrbitalDatesBackwards (selectedDate) {+ // Get the date as a string in UTC+ const utcDateString = selectedDate.toLocaleString('en-US', { timeZone: 'UTC' });+ // Convert the UTC string back to a Date object+ const currentDate = new Date(utcDateString);++ const prevDates = [formatDailyDate(currentDate)];++ for (let i = 1; i < 14; i += 1) {+ const previousDate = new Date(currentDate);+ previousDate.setDate(previousDate.getDate() - i);+ prevDates.push(formatDailyDate(previousDate));+ }+ return prevDates;+}++export function getOrbitalDatesForwards(selectedDate, latestDate) {+ // Get the date as a string in UTC+ const utcDateString = selectedDate.toLocaleString('en-US', { timeZone: 'UTC' });+ // Convert the UTC string back to a Date object+ const currentDate = new Date(utcDateString);++ const nextDates = [formatDailyDate(currentDate)];++ for (let i = 1; i < 14; i += 1) {+ const nextDate = new Date(currentDate);+ nextDate.setDate(nextDate.getDate() + i);++ // Stop adding dates if we've reached or exceeded the latestDate+ if (nextDate > new Date(latestDate)) {+ break;+ }++ nextDates.push(formatDailyDate(nextDate));+ }+ return nextDates;+}++export function getOrbitalDatesForwardsAndBackwards(selectedDate, latestDate) {+ // Get the date as a string in UTC+ const utcDateString = selectedDate.toLocaleString('en-US', { timeZone: 'UTC' });+ // Convert the UTC string back to a Date object+ const currentDate = new Date(utcDateString);++ const mixedDates = [formatDailyDate(currentDate)];++ for (let i = 1; i < 14; i += 1) {+ const nextDate = new Date(currentDate);+ const prevDate = new Date(currentDate);++ // Add future date if it does not exceed the latestDate+ nextDate.setDate(nextDate.getDate() + i);+ if (nextDate <= new Date(latestDate)) {+ mixedDates.push(formatDailyDate(nextDate));+ }++ // If we haven't reached the max of 14 dates, add a previous date+ if (mixedDates.length < 14) {+ prevDate.setDate(prevDate.getDate() - i);+ mixedDates.push(formatDailyDate(prevDate));+ }+ }+ // Trim the array down to 14 elements in case we've added too many+ return mixedDates.slice(0, 14);+}diff --git a/web/js/mapUI/components/layers/addLayer.js b/web/js/mapUI/components/layers/addLayer.jsindex 7efec94db..d18bb0c61 100644--- a/web/js/mapUI/components/layers/addLayer.js+++ b/web/js/mapUI/components/layers/addLayer.js@@ -25,7 +25,7 @@ function AddLayer(props) {} = props;useEffect(() => {- if (action.type === layerConstants.ADD_LAYER) {+ if (action.type === layerConstants.ADD_LAYER || action.type === layerConstants.UPDATE_DDV_LAYER) {const def = lodashFind(action.layers, { id: action.id });if (def.type === 'granule') {return granuleLayerAdd(def);diff --git a/web/js/mapUI/components/markers/markers.js b/web/js/mapUI/components/markers/markers.jsindex faffd07d3..b82953d17 100644--- a/web/js/mapUI/components/markers/markers.js+++ b/web/js/mapUI/components/markers/markers.js@@ -204,4 +204,3 @@ Markers.propTypes = {ui: PropTypes.object,};-diff --git a/web/js/mapUI/components/update-date/updateDate.js b/web/js/mapUI/components/update-date/updateDate.jsindex 52e520fc7..c7d172762 100644--- a/web/js/mapUI/components/update-date/updateDate.js+++ b/web/js/mapUI/components/update-date/updateDate.js@@ -51,7 +51,10 @@ function UpdateDate(props) {}return updateDate(action.outOfStep);} if (action.type === layerConstants.TOGGLE_LAYER_VISIBILITY || action.type === layerConstants.TOGGLE_OVERLAY_GROUP_VISIBILITY) {- return updateDate();+ const outOfStep = false;+ // if date not changing we do not want to recreate ttiler layer+ const skipTtiler = true;+ return updateDate(outOfStep, skipTtiler);}};@@ -79,7 +82,7 @@ function UpdateDate(props) {setStyleFunction(def, vectorStyleId, vectorStyles, null, vectorStyleState);}- async function updateCompareLayer (def, index, layerCollection) {+ async function updateCompareLayer (def, index, mapLayerCollection) {const { createLayer } = ui;const options = {group: activeString,@@ -87,11 +90,11 @@ function UpdateDate(props) {...getGranuleOptions(granuleState, def, activeString),};const updatedLayer = await createLayer(def, options);- layerCollection.setAt(index, updatedLayer);+ mapLayerCollection.setAt(index, updatedLayer);compareMapUi.update(activeString);}- async function updateDate(outOfStepChange) {+ async function updateDate(outOfStepChange, skipTtiler) {const { createLayer } = ui;const layerGroup = getActiveLayerGroup(layerState);@@ -112,7 +115,7 @@ function UpdateDate(props) {const index = findLayerIndex(def);const hasVectorStyles = config.vectorStyles && lodashGet(def, 'vectorStyle.id');if (isCompareActive && layers.length) {- await updateCompareLayer(def, index, mapLayerCollection);+ await updateCompareLayer(def, index, mapLayerCollection, layers, skipTtiler);} else if (temporalLayer) {if (index !== undefined && index !== -1) {const layerValue = layers[index];diff --git a/web/js/mapUI/mapUI.js b/web/js/mapUI/mapUI.jsindex 6f9a61c5a..23b6bb3a5 100644--- a/web/js/mapUI/mapUI.js+++ b/web/js/mapUI/mapUI.js@@ -18,7 +18,7 @@ import MouseMoveEvents from './components/mouse-move-events/mouseMoveEvents';import BufferQuickAnimate from './components/buffer-quick-animate/bufferQuickAnimate';import KioskAnimations from './components/kiosk/kiosk-animations/kiosk-animations';import TileMeasurement from './components/kiosk/tile-measurement/tile-measurement';-import TileImagePixelTest from './components/kiosk/tile-measurement/tile-image-test-mode/tile-image-test-mode';+import DevTestButton from './components/dev-test-mode/dev-test-button';import { LOCATION_POP_ACTION } from '../redux-location-state-customs';import { CHANGE_PROJECTION } from '../modules/projection/constants';import { SET_SCREEN_INFO } from '../modules/screen-size/constants';@@ -105,6 +105,7 @@ function MapUI(props) {return setProjectionTrigger((projectionTrigger) => projectionTrigger + 1);}case layerConstants.ADD_LAYER:+ case layerConstants.UPDATE_DDV_LAYER:case DISPLAY_STATIC_MAP:return setAddLayerAction(action);case STOP_ANIMATION:@@ -224,6 +225,7 @@ function MapUI(props) {const date = getSelectedDate(dateCompareState, dateGroup);const layers = getActiveLayers(activeLayersState, parentCompareGroup || group);const renderable = isRenderableLayer(id, layers, date, null, renderableLayersState);+layer.setVisible(renderable);};@@ -389,6 +391,7 @@ function MapUI(props) {preloadNextTiles={preloadNextTiles}updateLayerVisibilities={updateLayerVisibilities}getGranuleOptions={getGranuleOptions}+ findLayer={findLayer}/><UpdateOpacityaction={opacityAction}@@ -407,7 +410,8 @@ function MapUI(props) {<TileMeasurement ui={ui} /></>)}- {tileImageTestMode && <TileImagePixelTest />}+ {tileImageTestMode && <DevTestButton />}+</>);}diff --git a/web/js/modules/layers/actions.js b/web/js/modules/layers/actions.jsindex 961859a3d..95f875c57 100644--- a/web/js/modules/layers/actions.js+++ b/web/js/modules/layers/actions.js@@ -33,6 +33,7 @@ import {CHANGE_GRANULE_SATELLITE_INSTRUMENT_GROUP,UPDATE_LAYER_COLLECTION,UPDATE_LAYER_DATE_COLLECTION,+ UPDATE_DDV_LAYER,} from './constants';import { updateRecentLayers } from '../product-picker/util';import { getOverlayGroups, getLayersFromGroups } from './util';@@ -414,3 +415,36 @@ export function updateLayerDateCollection(layerInfo) {...layerInfo,};}++export function updateBandCombination(id, bandCombo, layerIndex) {+ return (dispatch, getState) => {+ const state = getState();+ const {+ layers, compare, proj, config,+ } = state;+ const layerObj = layers.layerConfig[id];+ const { groupOverlays } = layers[compare.activeString];+ const activeLayers = getActiveLayersSelector(state);+ const overlays = getLayersSelector(state, { group: 'overlays' });+ const newLayers = addLayerSelector(+ id,+ {},+ activeLayers,+ layers.layerConfig,+ overlays.length || 0,+ proj.id,+ groupOverlays,+ bandCombo,+ );+ const projections = Object.keys(config.projections);+ updateRecentLayers(layerObj, projections);++ dispatch({+ type: UPDATE_DDV_LAYER,+ id,+ activeString: compare.activeString,+ layers: newLayers,+ layerIndex,+ });+ };+}diff --git a/web/js/modules/layers/constants.js b/web/js/modules/layers/constants.jsindex c8caff903..21fadb4f5 100644--- a/web/js/modules/layers/constants.js+++ b/web/js/modules/layers/constants.js@@ -21,3 +21,4 @@ export const UPDATE_LAYER_DATE_COLLECTION = 'LAYERS/UPDATE_LAYER_DATE_COLLECTIONexport const DEFAULT_NUM_GRANULES = 10;export const MIN_GRANULES = 1;export const MAX_GRANULES = 30;+export const UPDATE_DDV_LAYER = 'LAYERS/UPDATE_DDV_LAYER';diff --git a/web/js/modules/layers/reducers.js b/web/js/modules/layers/reducers.jsindex a956be58e..ed819088e 100644--- a/web/js/modules/layers/reducers.js+++ b/web/js/modules/layers/reducers.js@@ -22,6 +22,7 @@ import {REMOVE_GROUP,UPDATE_LAYER_COLLECTION,UPDATE_LAYER_DATE_COLLECTION,+ UPDATE_DDV_LAYER,} from './constants';import {SET_CUSTOM as SET_CUSTOM_PALETTE,@@ -352,7 +353,6 @@ export function layerReducer(state = initialState, action) {},},},-});case UPDATE_LAYER_DATE_COLLECTION:@@ -368,8 +368,27 @@ export function layerReducer(state = initialState, action) {},},},+ });++ // This is required because to update band combinations we need to actually remove and re-add these layers+ // This case sets the ddv layer back to its original index before being removed and added again+ case UPDATE_DDV_LAYER: {+ const { layerIndex, id, layers } = action;+ const indexToMove = layers.findIndex((activeLayer) => activeLayer.id === id);+ const [layerToMove] = layers.splice(indexToMove, 1);+ layers.splice(layerIndex, 0, layerToMove);+ return update(state, {+ [compareState]: {+ $merge: {+ layers,+ overlayGroups: getOverlayGroups(layers, getPrevOverlayGroups()),+ prevLayers: [],+ layerIndex: action.layerIndex,+ },+ },});+ }default:return state;diff --git a/web/js/modules/layers/selectors.js b/web/js/modules/layers/selectors.jsindex 275c07b5f..2b3a08d90 100644--- a/web/js/modules/layers/selectors.js+++ b/web/js/modules/layers/selectors.js@@ -292,7 +292,7 @@ export const subdailyLayersActive = createSelector((layers) => hasSubDaily(layers),);-export function addLayer(id, spec = {}, layersParam, layerConfig, overlayLength, projection, groupOverlays) {+export function addLayer(id, spec = {}, layersParam, layerConfig, overlayLength, projection, groupOverlays, bandComboParam) {let layers = lodashCloneDeep(layersParam);if (projection) {layers = layers.filter((layer) => layer.projections[projection]);@@ -314,6 +314,16 @@ export function addLayer(id, spec = {}, layersParam, layerConfig, overlayLength,def.disabled = spec.disabled || undefined;def.count = spec.count || undefined;+ if (spec.bandCombo) {+ def.bandCombo = {+ r: spec.bandCombo[0],+ g: spec.bandCombo[1],+ b: spec.bandCombo[2],+ };+ } else if (bandComboParam) {+ def.bandCombo = bandComboParam;+ }+if (!lodashIsUndefined(spec.visible)) {def.visible = spec.visible;} else if (!lodashIsUndefined(spec.hidden)) {diff --git a/web/js/modules/layers/util.js b/web/js/modules/layers/util.jsindex 657954dc5..f40b54f47 100644--- a/web/js/modules/layers/util.js+++ b/web/js/modules/layers/util.js@@ -810,6 +810,14 @@ export function serializeLayers(layers, state, groupName) {value: def.opacity,});}+ if (def.bandCombo) {+ const { r, g, b } = def.bandCombo;+ const bands = `${r};${g};${b}`;+ item.attributes.push({+ id: 'bands',+ value: bands,+ });+ }if (def.palette && (def.custom || def.min || def.max || def.squash || def.disabled)) {// If layer has palette and palette attributesconst paletteAttributeArray = getPaletteAttributeArray(@@ -1062,6 +1070,7 @@ const getLayerSpec = (attributes) => {let custom;let disabled;let count;+ let bandCombo;lodashEach(attributes, (attr) => {if (attr.id === 'hidden') {@@ -1076,6 +1085,7 @@ const getLayerSpec = (attributes) => {const values = util.toArray(attr.value.split(';'));disabled = values;}+if (attr.id === 'max' && typeof attr.value === 'string') {const maxArray = [];const values = util.toArray(attr.value.split(';'));@@ -1124,6 +1134,12 @@ const getLayerSpec = (attributes) => {squash = squashArray.length ? squashArray : undefined;}}++ if (attr.id === 'bands') {+ const values = util.toArray(attr.value.split(';'));+ bandCombo = values;+ }+if (attr.id === 'palette') {const values = util.toArray(attr.value.split(';'));custom = values;@@ -1142,6 +1158,8 @@ const getLayerSpec = (attributes) => {hidden,opacity,count,+ bandCombo,+// only include palette attributes if Array.length condition// is true: https://stackoverflow.com/a/40560953/4589331...isArray(custom) && { custom },diff --git a/web/js/modules/map/util.js b/web/js/modules/map/util.jsindex 06d8f533a..42365ab17 100644--- a/web/js/modules/map/util.js+++ b/web/js/modules/map/util.js@@ -291,7 +291,7 @@ export async function promiseImageryForTime(state, date, activeString) {} = map.ui;const layers = getActiveVisibleLayersAtDate(state, date, activeString);await Promise.all(layers.map(async (layer) => {- if (layer.type === 'granule') {+ if (layer.type === 'granule' || layer.type === 'ttiler') {return Promise.resolve();}const options = { date, group: activeString };diff --git a/web/scss/features/customize-bands.scss b/web/scss/features/customize-bands.scssnew file mode 100644index 000000000..24c78069f--- /dev/null+++ b/web/scss/features/customize-bands.scss@@ -0,0 +1,100 @@+.customize-bands-parent-info {+ margin-bottom: 12px;++ hr {+ margin-top: 20px;+ margin-bottom: 20px;+ }++ p {+ line-height: 1.5;+ }++ .current-band-info {+ margin-left: 10px;+ margin-bottom: 10px;++ div {+ line-height: 1.5;+ }++ .band-color {+ display: inline-block;+ min-width: 50px;+ font-weight: bold;+ }+ }+}++.customize-bands-container {+ display: flex;+ justify-content: center;+ align-items: center;+ flex-direction: column;++ .band-selection-title-row {+ display: flex;+ justify-content: space-between;+ align-items: center;+ width: 100%;+ }++ .band-selection-row {+ display: flex;+ justify-content: flex-start;+ align-items: center;+ margin-top: 1.5rem;++ p {+ margin-right: .75rem;+ }++ .band-selection-rwb-info {+ margin-left: .75rem;+ }++ .band-selection-color-header {+ font-weight: bold;+ }+ }++ .band-selection-button-row {+ margin-top: 1.5rem;+ }++ .band-selection-presets-container {+ width: 100%;+ margin-top: 1.5rem;+ margin-bottom: 1.5rem;++ .band-selection-presets-title-row p {+ font-weight: bold;+ margin-bottom: .5rem;+ }++ .band-selection-presets-scrollable {+ overflow-y: scroll;+ height: 300px;+ }++ .band-selection-preset-card {+ cursor: pointer;+ display: flex;+ flex-direction: row;+ height: 60px;+ background-color: $wv-transparent-black;+ color: $wv-white-font;+ border: 2px solid $wv-dark-menu-border;++ .band-selection-preset-image {+ width: 60px;+ height: 56px;+ }+ }++ .selected-preset {+ background-color: $wv-dark-blue;+ border: 2px solid $wv-orange;+ }+ }+}\ No newline at end of filediff --git a/web/scss/index.scss b/web/scss/index.scssindex 8aee34333..313c4fb42 100644--- a/web/scss/index.scss+++ b/web/scss/index.scss@@ -24,6 +24,7 @@@import "features/anim-widget";@import "features/compare";@import "features/context-menu";+@import "features/customize-bands";@import "features/embed";@import "features/events";@import "features/event-filter";