Interactive interface for browsing global, full-resolution satellite imagery
WV-3692 and WV-3466: Add Flood event and add new layers to events (#6033)
minniewong70968e39e3ce
diff --git a/config/default/common/config/wv.json/naturalEvents.json b/config/default/common/config/wv.json/naturalEvents.jsonindex 188ec55b7..becfbb95f 100644--- a/config/default/common/config/wv.json/naturalEvents.json+++ b/config/default/common/config/wv.json/naturalEvents.json@@ -44,6 +44,13 @@"description": "Related to events that alter the appearance of water: phytoplankton, red tide, algae, sediment, whiting, etc.","layers": "https://eonet.gsfc.nasa.gov/api/v3/layers/waterColor"},+ {+ "id": "floods",+ "title": "Floods",+ "link": "https://eonet.gsfc.nasa.gov/api/v3/categories/floods",+ "description": "Related to aspects of actual flooding--e.g., inundation, water extending beyond river and lake extents.",+ "layers": "https://eonet.gsfc.nasa.gov/api/v3/layers/floods"+ },{"id": "wildfires","title": "Wildfires",@@ -118,6 +125,14 @@"MODIS_Aqua_Thermal_Anomalies_Night",false],+ [+ "VIIRS_NOAA21_Thermal_Anomalies_375m_Day",+ false+ ],+ [+ "VIIRS_NOAA21_Thermal_Anomalies_375m_Night",+ false+ ],["VIIRS_NOAA20_Thermal_Anomalies_375m_Day",false@@ -351,16 +366,6 @@false]],- "Floods": [- [- "Reference_Features_15m",- true- ],- [- "Reference_Labels_15m",- true- ]- ],"Volcanoes": [["MODIS_Terra_CorrectedReflectance_TrueColor",@@ -398,6 +403,14 @@"MODIS_Aqua_Thermal_Anomalies_Night",false],+ [+ "VIIRS_NOAA21_Thermal_Anomalies_375m_Day",+ false+ ],+ [+ "VIIRS_NOAA21_Thermal_Anomalies_375m_Night",+ false+ ],["VIIRS_NOAA20_Thermal_Anomalies_375m_Day",false@@ -482,6 +495,14 @@"VIIRS_NOAA20_DayNightBand_At_Sensor_Radiance",false],+ [+ "OMPS_NOAA20_NadirMapper_AerosolIndex_PyroCumuloNimbus_380",+ false+ ],+ [+ "OMPS_NOAA20_NadirMapper_AerosolIndex_380",+ false+ ],["OMPS_Aerosol_Index_PyroCumuloNimbus",false@@ -506,6 +527,14 @@"MODIS_Aqua_Thermal_Anomalies_Night",false],+ [+ "VIIRS_NOAA21_Thermal_Anomalies_375m_Day",+ false+ ],+ [+ "VIIRS_NOAA21_Thermal_Anomalies_375m_Night",+ false+ ],["VIIRS_NOAA20_Thermal_Anomalies_375m_Day",false@@ -633,6 +662,88 @@false]],+ "Floods": [+ [+ "Reference_Features_15m",+ true+ ],+ [+ "Reference_Labels_15m",+ true+ ],+ [+ "MODIS_Terra_CorrectedReflectance_TrueColor",+ true+ ],+ [+ "MODIS_Terra_CorrectedReflectance_Bands721",+ false+ ],+ [+ "MODIS_Aqua_CorrectedReflectance_TrueColor",+ false+ ],+ [+ "MODIS_Aqua_CorrectedReflectance_Bands721",+ false+ ],+ [+ "VIIRS_NOAA21_CorrectedReflectance_TrueColor",+ false+ ],+ [+ "VIIRS_NOAA21_CorrectedReflectance_BandsM11-I2-I1",+ false+ ],+ [+ "VIIRS_NOAA20_CorrectedReflectance_TrueColor",+ false+ ],+ [+ "VIIRS_NOAA20_CorrectedReflectance_BandsM11-I2-I1",+ false+ ],+ [+ "VIIRS_SNPP_CorrectedReflectance_TrueColor",+ false+ ],+ [+ "HLS_L30_Nadir_BRDF_Adjusted_Reflectance",+ false+ ],+ [+ "HLS_S30_Nadir_BRDF_Adjusted_Reflectance",+ false+ ],+ [+ "MODIS_Combined_Flood_3-Day",+ false+ ],+ [+ "MODIS_Combined_Flood_2-Day",+ false+ ],+ [+ "VIIRS_Combined_Flood_3-Day",+ true+ ],+ [+ "VIIRS_Combined_Flood_2-Day",+ true+ ],+ [+ "IMERG_Precipitation_Rate",+ true+ ],+ [+ "OPERA_L3_Dynamic_Surface_Water_Extent-HLS",+ false+ ],+ [+ "OPERA_L3_Dynamic_Surface_Water_Extent-Sentinel-1",+ false+ ]+ ],"Water Color": [["Reference_Features_15m",@@ -730,6 +841,10 @@],["IMERG_Precipitation_Rate",+ false+ ],+ [+ "IMERG_Precipitation_Rate_30min",true]],@@ -797,6 +912,10 @@["IMERG_Precipitation_Rate",false+ ],+ [+ "IMERG_Precipitation_Rate_30min",+ false]],"Volcanoes": [@@ -828,6 +947,22 @@"AIRS_Prata_SO2_Index_Night",false],+ [+ "OMPS_NOAA20_SO2_Upper_Troposphere_and_Stratosphere",+ false+ ],+ [+ "OMPS_NOAA20_SO2_Middle_Troposphere",+ false+ ],+ [+ "OMPS_NOAA20_SO2_Lower_Troposphere",+ true+ ],+ [+ "OMPS_NOAA20_SO2_Planetary_Boundary_Layer",+ false+ ],["OMPS_SO2_Upper_Troposphere_and_Stratosphere",false@@ -860,6 +995,14 @@"MODIS_Aqua_Thermal_Anomalies_Night",false],+ [+ "VIIRS_NOAA21_Thermal_Anomalies_375m_Day",+ false+ ],+ [+ "VIIRS_NOAA21_Thermal_Anomalies_375m_Night",+ false+ ],["VIIRS_NOAA20_Thermal_Anomalies_375m_Day",false@@ -1008,10 +1151,6 @@"AIRS_L3_Carbon_Monoxide_500hPa_Volume_Mixing_Ratio_Monthly_Night",false],- [- "MOPITT_CO_Daily_Total_Column_L2",- false- ],["OMI_Nitrogen_Dioxide_Tropo_Column",false@@ -1031,6 +1170,10 @@["OMPS_Aerosol_Index",false+ ],+ [+ "OMPS_NOAA20_NadirMapper_AerosolIndex_380",+ false]]},@@ -1084,6 +1227,14 @@"MODIS_Terra_Thermal_Anomalies_Night",true],+ [+ "VIIRS_NOAA21_Thermal_Anomalies_375m_Day",+ false+ ],+ [+ "VIIRS_NOAA21_Thermal_Anomalies_375m_Night",+ false+ ],["VIIRS_NOAA20_Thermal_Anomalies_375m_Day",falsediff --git a/e2e/features/events/event-filter-test.spec.js b/e2e/features/events/event-filter-test.spec.jsindex 80f6f78f7..2083d4fbe 100644--- a/e2e/features/events/event-filter-test.spec.js+++ b/e2e/features/events/event-filter-test.spec.js@@ -42,7 +42,7 @@ test('Default filtering includes last 120 days and all categories', async () =>await page.goto(fixedAppNow)await closeModal(page)await eventsTab.click()- await expect(filterIcons).toHaveCount(8)+ await expect(filterIcons).toHaveCount(9)await expect(filterDates).toContainText('2011 SEP 02 - 2011 DEC 31')})@@ -56,6 +56,7 @@ test('Filter modal inputs are correct', async () => {snowSwitch,volcanoesSwitch,watercolorSwitch,+ floodsSwitch,wildfiresSwitch,mapExtentFilterCheckbox} = selectors@@ -68,6 +69,7 @@ test('Filter modal inputs are correct', async () => {await expect(snowSwitch).toBeChecked()await expect(volcanoesSwitch).toBeChecked()await expect(watercolorSwitch).toBeChecked()+ await expect(floodsSwitch).toBeChecked()await expect(wildfiresSwitch).toBeChecked()await expect(mapExtentFilterCheckbox).not.toBeChecked()})@@ -75,7 +77,7 @@ test('Filter modal inputs are correct', async () => {test('URL params for categories, dates, and extent filtering are present', async () => {const currentUrl = await page.url()expect(currentUrl).toContain('e=true')- expect(currentUrl).toContain('efc=dustHaze,manmade,seaLakeIce,severeStorms,snow,volcanoes,waterColor,wildfires')+ expect(currentUrl).toContain('efc=dustHaze,manmade,seaLakeIce,severeStorms,snow,volcanoes,waterColor,floods,wildfires')expect(currentUrl).toContain('efd=2011-09-02,2011-12-31')expect(currentUrl).toContain('efs=true')})@@ -93,6 +95,7 @@ test('Loading from permalink sets all criteria properly', async () => {snowSwitch,volcanoesSwitch,watercolorSwitch,+ floodsSwitch,wildfiresSwitch,wildfiresIcon} = selectors@@ -119,6 +122,7 @@ test('Loading from permalink sets all criteria properly', async () => {await expect(snowSwitch).not.toBeChecked()await expect(volcanoesSwitch).not.toBeChecked()await expect(watercolorSwitch).not.toBeChecked()+ await expect(floodsSwitch).not.toBeChecked()await expect(wildfiresSwitch).toBeChecked()await expect(mapExtentFilterCheckbox).toBeChecked()})@@ -165,6 +169,7 @@ test('Opening modal after cancelling changed values shows previous unchanged valsnowSwitch,volcanoesSwitch,watercolorSwitch,+ floodsSwitch,wildfiresSwitch,mapExtentFilterCheckbox} = selectors@@ -177,6 +182,7 @@ test('Opening modal after cancelling changed values shows previous unchanged valawait expect(snowSwitch).not.toBeChecked()await expect(volcanoesSwitch).not.toBeChecked()await expect(watercolorSwitch).not.toBeChecked()+ await expect(floodsSwitch).not.toBeChecked()await expect(wildfiresSwitch).toBeChecked()await expect(mapExtentFilterCheckbox).toBeChecked()})@@ -225,7 +231,7 @@ test('Event Selected, No Filter Params: Shows only day of event, all categories,await expect(filterDates).toContainText('2005 DEC 31 - 2005 DEC 31')await filterButton.click()await assertDateInputValues('2005-DEC-31', '2005-DEC-31')- await expect(filterIcons).toHaveCount(8)+ await expect(filterIcons).toHaveCount(9)await expect(mapExtentFilterCheckbox).not.toBeChecked()await page.locator('.modal-close-btn').click()})diff --git a/e2e/test-utils/global-variables/selectors.js b/e2e/test-utils/global-variables/selectors.jsindex df8cbc51e..e5e992874 100644--- a/e2e/test-utils/global-variables/selectors.js+++ b/e2e/test-utils/global-variables/selectors.js@@ -268,6 +268,7 @@ module.exports = (page) => ({snowSwitch: page.locator('#snow-switch'),volcanoesSwitch: page.locator('#volcanoes-switch'),watercolorSwitch: page.locator('#waterColor-switch'),+ floodsSwitch: page.locator('#floods-switch'),wildfiresSwitch: page.locator('#wildfires-switch'),mapExtentFilterCheckbox: page.locator('#map-extent-filter'),startInputYear: page.locator('#year-event-filter-start'),diff --git a/web/images/natural-events/icon-floods.svg b/web/images/natural-events/icon-floods.svgnew file mode 100644index 000000000..6d153d0ff--- /dev/null+++ b/web/images/natural-events/icon-floods.svg@@ -0,0 +1,23 @@+<?xml version="1.0" encoding="UTF-8"?>+<svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26">+ <defs>+ <style>+ .cls-1 {+ opacity: .6;+ }++ .cls-1, .cls-2 {+ fill: #fff;+ }++ .cls-3 {+ fill: #004868;+ }+ </style>+ </defs>+ <g id="Layer_1_copy" data-name="Layer 1 copy">+ <circle class="cls-3" cx="13" cy="13" r="13"/>+ <path class="cls-2" d="M24.57,13.06c-.59,0-1.09-.37-1.29-.89-.2.52-.7.89-1.29.89s-1.09-.37-1.29-.89c-.2.52-.7.89-1.29.89s-1.09-.37-1.29-.89c-.2.52-.7.89-1.29.89s-1.09-.37-1.29-.89c-.2.52-.7.89-1.29.89s-1.09-.37-1.29-.89c-.2.52-.7.89-1.29.89s-1.09-.37-1.29-.89c-.2.52-.7.89-1.29.89s-1.09-.37-1.29-.89c-.2.52-.7.89-1.29.89s-1.09-.37-1.29-.89c-.2.52-.7.89-1.29.89s-1.09-.37-1.29-.89c-.19.51-.67.87-1.25.89,0,.1,0,.2-.02.3.19,6.26,5.3,11.27,11.6,11.27s11.42-5.02,11.6-11.27c0-.1,0-.2-.01-.29,0,0-.01,0-.02,0Z"/>+ <path class="cls-1" d="M18.32,6.7v-3.75h-2.48v1.92l-2.85-2.59-7.8,6.91h1.6v3.03c.35-.1.63-.36.77-.74,0,0,.03-.3.24-.3s.24.3.24.3c.17.48.58.79,1.04.79s.88-.31,1.04-.79c0,0,.03-.29.24-.29s.24.29.24.29c.17.48.58.79,1.04.79s.88-.31,1.04-.79c0,0,.07-.29.24-.29s.24.29.24.29c.17.48.58.79,1.04.79s.88-.31,1.04-.79c0,0,.03-.29.24-.29s.24.29.24.29c.17.48.58.79,1.04.79s.88-.31,1.04-.79c0,0,.05-.3.24-.3s.24.3.24.3c.14.39.44.66.81.75v-3.04h1.6l-2.46-2.49ZM14.09,9.24h-2.25v-2.72h2.25v2.72Z"/>+ </g>+</svg>\ No newline at end of filediff --git a/web/js/map/natural-events/event-markers.js b/web/js/map/natural-events/event-markers.jsindex 23da7bdbb..37021e1e2 100644--- a/web/js/map/natural-events/event-markers.js+++ b/web/js/map/natural-events/event-markers.js@@ -26,6 +26,7 @@ import { CRS } from '../../modules/map/constants';const icons = ['dustHaze','manmade',+ 'floods','seaLakeIce','severeStorms','snow',diff --git a/web/scss/features/events.scss b/web/scss/features/events.scssindex bf7abc5ae..5c3bb6051 100644--- a/web/scss/features/events.scss+++ b/web/scss/features/events.scss@@ -405,6 +405,10 @@background: url("../images/natural-events/icon-icebergs.svg");}+.event-icon-floods {+ background: url("../images/natural-events/icon-floods.svg");+}+.event-icon-manmade {background: url("../images/natural-events/icon-manmade.svg");}