From 26b0c44fbe1e28280f4459a1c2393c236de8dc78 Mon Sep 17 00:00:00 2001 From: Ryan Weiler Date: Tue, 17 Oct 2023 10:57:54 -0400 Subject: [PATCH 1/4] update ddv layer configs (#4734) --- .../layers/multi-mission/hls/HLS_Customizable_Landsat.json | 3 ++- .../layers/multi-mission/hls/HLS_Customizable_Sentinel.json | 3 ++- .../layers/multi-mission/hls/HLS_False_Color_Landsat.json | 3 ++- .../layers/multi-mission/hls/HLS_False_Color_Sentinel.json | 3 ++- .../multi-mission/hls/HLS_False_Color_Urban_Landsat.json | 3 ++- .../multi-mission/hls/HLS_False_Color_Urban_Sentinel.json | 3 ++- .../multi-mission/hls/HLS_False_Color_Vegetation_Landsat.json | 3 ++- .../multi-mission/hls/HLS_False_Color_Vegetation_Sentinel.json | 3 ++- .../layers/multi-mission/hls/HLS_Moisture_Index_Landsat.json | 3 ++- .../layers/multi-mission/hls/HLS_Moisture_Index_Sentinel.json | 3 ++- .../wv.json/layers/multi-mission/hls/HLS_NDSI_Landsat.json | 3 ++- .../wv.json/layers/multi-mission/hls/HLS_NDSI_Sentinel.json | 3 ++- .../wv.json/layers/multi-mission/hls/HLS_NDVI_Landsat.json | 3 ++- .../wv.json/layers/multi-mission/hls/HLS_NDVI_Sentinel.json | 3 ++- .../wv.json/layers/multi-mission/hls/HLS_NDWI_Landsat.json | 3 ++- .../wv.json/layers/multi-mission/hls/HLS_NDWI_Sentinel.json | 3 ++- .../multi-mission/hls/HLS_Shortwave_Infrared_Landsat.json | 3 ++- .../multi-mission/hls/HLS_Shortwave_Infrared_Sentinel.json | 3 ++- 18 files changed, 36 insertions(+), 18 deletions(-) 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.json index 5a8e468be0..39f5b3f574 100644 --- 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.json @@ -25,7 +25,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } 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.json index 29eae0cb68..cd3fa11203 100644 --- 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.json @@ -25,7 +25,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } 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.json index 6c11829e8b..1792544917 100644 --- 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.json @@ -25,7 +25,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } 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.json index 80fbe3ee31..2b708ff334 100644 --- 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.json @@ -25,7 +25,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } 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.json index 364a73e29d..0bef4e5f4d 100644 --- 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.json @@ -25,7 +25,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } 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.json index d18b9d3abb..092e2aa05e 100644 --- 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.json @@ -25,7 +25,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } 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.json index 8017f74aa3..37c7f7cc11 100644 --- 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.json @@ -25,7 +25,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } 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.json index 00b1005fb7..3586a3e1b9 100644 --- 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.json @@ -25,7 +25,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Moisture_Index_Landsat.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Moisture_Index_Landsat.json index ed90df6fb8..b3496d525b 100644 --- a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Moisture_Index_Landsat.json +++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Moisture_Index_Landsat.json @@ -26,7 +26,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } \ No newline at end of file diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Moisture_Index_Sentinel.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Moisture_Index_Sentinel.json index 81ec7520dd..4a42c8f498 100644 --- a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Moisture_Index_Sentinel.json +++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_Moisture_Index_Sentinel.json @@ -26,7 +26,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } \ No newline at end of file diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDSI_Landsat.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDSI_Landsat.json index 4b369aae33..9072218d1d 100644 --- a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDSI_Landsat.json +++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDSI_Landsat.json @@ -26,7 +26,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } \ No newline at end of file diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDSI_Sentinel.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDSI_Sentinel.json index 24f451e519..fd5627e2b8 100644 --- a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDSI_Sentinel.json +++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDSI_Sentinel.json @@ -26,7 +26,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } \ No newline at end of file diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDVI_Landsat.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDVI_Landsat.json index 5a674a8c27..62e0bfa265 100644 --- a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDVI_Landsat.json +++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDVI_Landsat.json @@ -26,7 +26,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } \ No newline at end of file diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDVI_Sentinel.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDVI_Sentinel.json index cf2dae31a2..84fa0fee6d 100644 --- a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDVI_Sentinel.json +++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDVI_Sentinel.json @@ -26,7 +26,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } \ No newline at end of file diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDWI_Landsat.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDWI_Landsat.json index 7a910d465d..7ca0419c38 100644 --- a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDWI_Landsat.json +++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDWI_Landsat.json @@ -26,7 +26,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } \ No newline at end of file diff --git a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDWI_Sentinel.json b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDWI_Sentinel.json index e823067c8c..b012a82c6e 100644 --- a/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDWI_Sentinel.json +++ b/config/default/common/config/wv.json/layers/multi-mission/hls/HLS_NDWI_Sentinel.json @@ -26,7 +26,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } \ No newline at end of file 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.json index d8b69ed35a..ef7e7f8f71 100644 --- 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.json @@ -25,7 +25,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } 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.json index 21ed6b53ac..84b8b3e9a7 100644 --- 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.json @@ -25,7 +25,8 @@ "source": "DDV", "matrixSet": "31.25m" } - } + }, + "startDate": "2022-01-01T00:00:00Z" } } } From 93a3ab955f543b6e278df968e8e75c780abdf25e Mon Sep 17 00:00:00 2001 From: Tom Cariello Date: Tue, 17 Oct 2023 14:48:50 -0400 Subject: [PATCH 2/4] Added tough-cookie to package.json (#4737) --- package-lock.json | 30 +++++++++++------------------- package.json | 1 + 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index c080427f7b..719a498fab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -72,6 +72,7 @@ "simplebar-react": "^3.2.4", "stackblur": "^1.0.0", "supercluster": "^8.0.1", + "tough-cookie": "^4.1.3", "upng-js": "^2.1.0", "url-template": "^3.1.0", "what-input": "^5.2.12" @@ -14603,7 +14604,6 @@ }, "node_modules/psl": { "version": "1.9.0", - "dev": true, "license": "MIT" }, "node_modules/punycode": { @@ -14653,7 +14653,6 @@ }, "node_modules/querystringify": { "version": "2.2.0", - "dev": true, "license": "MIT" }, "node_modules/queue-microtask": { @@ -15634,7 +15633,6 @@ }, "node_modules/requires-port": { "version": "1.0.0", - "dev": true, "license": "MIT" }, "node_modules/reselect": { @@ -17370,9 +17368,9 @@ } }, "node_modules/tough-cookie": { - "version": "4.1.2", - "dev": true, - "license": "BSD-3-Clause", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "dependencies": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -17665,7 +17663,6 @@ }, "node_modules/universalify": { "version": "0.2.0", - "dev": true, "license": "MIT", "engines": { "node": ">= 4.0.0" @@ -17725,7 +17722,6 @@ }, "node_modules/url-parse": { "version": "1.5.10", - "dev": true, "license": "MIT", "dependencies": { "querystringify": "^2.1.1", @@ -28599,8 +28595,7 @@ "version": "1.1.0" }, "psl": { - "version": "1.9.0", - "dev": true + "version": "1.9.0" }, "punycode": { "version": "2.3.0" @@ -28624,8 +28619,7 @@ "dev": true }, "querystringify": { - "version": "2.2.0", - "dev": true + "version": "2.2.0" }, "queue-microtask": { "version": "1.2.3" @@ -29340,8 +29334,7 @@ "dev": true }, "requires-port": { - "version": "1.0.0", - "dev": true + "version": "1.0.0" }, "reselect": { "version": "4.1.8", @@ -30541,8 +30534,9 @@ "dev": true }, "tough-cookie": { - "version": "4.1.2", - "dev": true, + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", + "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", "requires": { "psl": "^1.1.33", "punycode": "^2.1.1", @@ -30737,8 +30731,7 @@ "dev": true }, "universalify": { - "version": "0.2.0", - "dev": true + "version": "0.2.0" }, "unpipe": { "version": "1.0.0", @@ -30769,7 +30762,6 @@ }, "url-parse": { "version": "1.5.10", - "dev": true, "requires": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" diff --git a/package.json b/package.json index cb6c2b851b..2530de4afb 100644 --- a/package.json +++ b/package.json @@ -208,6 +208,7 @@ "simplebar-react": "^3.2.4", "stackblur": "^1.0.0", "supercluster": "^8.0.1", + "tough-cookie": "^4.1.3", "upng-js": "^2.1.0", "url-template": "^3.1.0", "what-input": "^5.2.12" From 7bc6c6d89ef0ebf44a7e2d1026abc248591cd34e Mon Sep 17 00:00:00 2001 From: Tom Cariello Date: Tue, 17 Oct 2023 14:49:23 -0400 Subject: [PATCH 3/4] WV-2920 flood (#4735) * Updated value pushed to initializeDisabled array during build. * Apply change to all layers (not just MODIS Flood) & remove comments * Remove unnecessary 'id' arg from processEntries function * Replaced comment * Fixed comment --- tasks/build-options/processColormap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/build-options/processColormap.js b/tasks/build-options/processColormap.js index 00ffa8d381..b36bbf6c6c 100755 --- a/tasks/build-options/processColormap.js +++ b/tasks/build-options/processColormap.js @@ -161,7 +161,7 @@ async function processEntries (colormap) { // If entry is served transparent, add it to the disabled array if (entry._attributes.transparent !== 'false') { - initializeDisabled.push(index) + initializeDisabled.push(refsList.length) } if (!entry._attributes.ref) { From a0557e665df7a7bfc4fe83703f3044ed5d66132f Mon Sep 17 00:00:00 2001 From: christof-wittreich Date: Tue, 17 Oct 2023 14:34:32 -0500 Subject: [PATCH 4/4] WV-2913: Multiple Tracks Incorrectly Highlighted Simultaneously (#4736) * Added overlay removal by id * Fixed failing test * Added createOverlayMapping function --- web/js/map/natural-events/event-track.js | 25 +++++++++++++++++------- web/js/map/natural-events/util.js | 2 +- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/web/js/map/natural-events/event-track.js b/web/js/map/natural-events/event-track.js index c22878f5d6..e1b8feb0a9 100644 --- a/web/js/map/natural-events/event-track.js +++ b/web/js/map/natural-events/event-track.js @@ -23,10 +23,10 @@ import { getTrackLines, getTrackPoint, getArrows, getClusterPointEl, } from './util'; -const removePointOverlays = (map, pointsAndArrows) => { +const removePointOverlays = (map, pointsAndArrows, overlayMapping) => { lodashEach(pointsAndArrows, (pointOverlay) => { if (map.getOverlayById(pointOverlay.getId())) { - map.removeOverlay(pointOverlay); + map.removeOverlay(overlayMapping[pointOverlay.getId()] || pointsAndArrows); } }); }; @@ -143,20 +143,31 @@ function EventTrack () { showAllTracksRef.current = showAllTracks; }, [showAllTracks]); + const createOverlayMapping = (mapArg) => { + const overlayMapping = {}; + mapArg.getOverlays().forEach((overlay) => { + overlayMapping[overlay.getId()] = overlay; + }); + return overlayMapping; + }; + const removeAllTracks = (mapArg) => { + if (!mapArg) return; + const overlayMapping = createOverlayMapping(mapArg); allTrackDetailsRef.current?.forEach((trackDetail) => { const { pointsAndArrows } = trackDetail.newTrackDetails; const { track } = trackDetail.newTrackDetails; - mapArg.removeOverlay(track); - removePointOverlays(mapArg, pointsAndArrows); + mapArg.removeOverlay(overlayMapping[track.id] || track); + removePointOverlays(mapArg, pointsAndArrows, overlayMapping); }); }; const removeTrack = (mapArg) => { if (!mapArg) return; + const overlayMapping = createOverlayMapping(mapArg); const { track, pointsAndArrows } = trackDetailsRef.current; - mapArg.removeOverlay(track); - removePointOverlays(mapArg, pointsAndArrows); + mapArg.removeOverlay(overlayMapping[track?.id] || track); + removePointOverlays(mapArg, pointsAndArrows, overlayMapping); return {}; }; @@ -326,7 +337,7 @@ function EventTrack () { if (prevMap) { update(null); removeTrack(prevMap); - removePointOverlays(prevMap, trackDetailsRef.current.pointsAndArrows); + removePointOverlays(prevMap, trackDetailsRef.current.pointsAndArrows, createOverlayMapping(prevMap)); if (showAllTracksRef.current) { removeAllTracks(prevMap); } diff --git a/web/js/map/natural-events/util.js b/web/js/map/natural-events/util.js index 89180ee98b..b27569db0f 100644 --- a/web/js/map/natural-events/util.js +++ b/web/js/map/natural-events/util.js @@ -219,7 +219,7 @@ export const getTrackLines = function(map, trackCoords, eventID, date, callback, insertFirst: true, stopEvent: false, element: svgEl, - id: 'event-track', + id: `event-track-${eventID}`, }); };