Interactive interface for browsing global, full-resolution satellite imagery
WV-3463 Implement connection to NOAA WMTS for Maxar imagery (#5668)
Patrick Moulden693f70a131cc
diff --git a/config/default/common/config/metadata/layers/multi-mission/merged/NOAA_2025_ERI_WMTS.md b/config/default/common/config/metadata/layers/multi-mission/merged/NOAA_2025_ERI_WMTS.mdnew file mode 100644index 000000000..da89798f7--- /dev/null+++ b/config/default/common/config/metadata/layers/multi-mission/merged/NOAA_2025_ERI_WMTS.md@@ -0,0 +1,7 @@+The reflectance (True Color) imagery from January 8 to 20, 2025 of the January 2025 fires in the Los Angeles area of California was made available from [Maxar's Open Data Program](https://www.maxar.com/open-data) via [NOAA’s National Geodetic Survey Emergency Response Imagery](https://storms.ngs.noaa.gov/). The imagery is from the MAXAR constellation of satellites including, but not limited to, WorldView 2, WorldView 3, Worldview Legion 2, and GeoEye-1. The spatial resolution determined by the ground sample distance (GSD) for each pixel is approximately 30 cm.++[Maxar Open Data](https://maxar-marketing.s3.amazonaws.com/files/downloads/119757_opendataprotocol_2020_04.pdf) licensed under [Creative Commons Attribution Non Commercial 4.0](https://creativecommons.org/licenses/by-nc/4.0/legalcode).++Aerial imagery from January 28, 2025 was acquired to support response efforts for the California fires. The aerial photography missions were conducted by the NOAA Remote Sensing Division. The images were acquired using a Digital Sensor System (DSS) version 6. The spatial resolution determined by the ground sample distance (GSD) for each pixel is approximately 7.5 cm.++National Geodetic Survey, 2025: 2025 NOAA NGS Emergency Response Imagery: California Fires, [https://www.fisheries.noaa.gov/inport/item/74399](https://www.fisheries.noaa.gov/inport/item/74399).diff --git a/config/default/common/config/wv.json/categories/featured/All.json b/config/default/common/config/wv.json/categories/featured/All.jsonindex 3c224edce..a43e666e8 100644--- a/config/default/common/config/wv.json/categories/featured/All.json+++ b/config/default/common/config/wv.json/categories/featured/All.json@@ -7,6 +7,7 @@"id": "featured-all","description": "","measurements": [+ "Disaster Response - Featured","TEMPO - Featured","Land Surface Reflectance - Featured","Surface Water Extent",diff --git a/config/default/common/config/wv.json/categories/hazards_and_disasters/All.json b/config/default/common/config/wv.json/categories/hazards_and_disasters/All.jsonindex 5a1a3cd21..7ab7d1fef 100644--- a/config/default/common/config/wv.json/categories/hazards_and_disasters/All.json+++ b/config/default/common/config/wv.json/categories/hazards_and_disasters/All.json@@ -40,6 +40,7 @@"Corrected Reflectance","Cyclone Hazard","Dams",+ "Disaster Response","Drought Hazard","Dust","Earth at Night",diff --git a/config/default/common/config/wv.json/categories/science_disciplines/All.json b/config/default/common/config/wv.json/categories/science_disciplines/All.jsonindex 38d22d375..1a1ffd042 100644--- a/config/default/common/config/wv.json/categories/science_disciplines/All.json+++ b/config/default/common/config/wv.json/categories/science_disciplines/All.json@@ -40,6 +40,7 @@"Corrected Reflectance","Cyclone Hazard","Dams",+ "Disaster Response","Drought Hazard","Dust","Earth at Night",diff --git a/config/default/common/config/wv.json/layerOrder.json b/config/default/common/config/wv.json/layerOrder.jsonindex f6cf26695..f9e82cf06 100644--- a/config/default/common/config/wv.json/layerOrder.json+++ b/config/default/common/config/wv.json/layerOrder.json@@ -1,5 +1,6 @@{"layerOrder": [+ "NOAA_2025_ERI_WMTS","HLS_S30_Nadir_BRDF_Adjusted_Reflectance","HLS_L30_Nadir_BRDF_Adjusted_Reflectance","HLS_Customizable_Landsat",diff --git a/config/default/common/config/wv.json/layers/multi-mission/merged/NOAA_2025_ERI_WMTS.json b/config/default/common/config/wv.json/layers/multi-mission/merged/NOAA_2025_ERI_WMTS.jsonnew file mode 100644index 000000000..d67d90060--- /dev/null+++ b/config/default/common/config/wv.json/layers/multi-mission/merged/NOAA_2025_ERI_WMTS.json@@ -0,0 +1,48 @@+{+ "layers": {+ "NOAA_2025_ERI_WMTS": {+ "id": "NOAA_2025_ERI_WMTS",+ "title": "Reflectance (True Color): January 2025 California Fires",+ "subtitle": "Maxar Constellation and NOAA",+ "description": "multi-mission/merged/NOAA_2025_ERI_WMTS",+ "group": "overlays",+ "tags": "maxar noaa",+ "format": "image/jpgpng",+ "type": "composite:wmts",+ "period": "daily",+ "layers": [+ "20250108m-maxar",+ "20250109m-maxar",+ "20250110n-maxar",+ "20250113m-maxar",+ "20250114m-maxar",+ "20250116m-maxar",+ "20250118m-maxar",+ "20250120m-maxar",+ "20250128a-rgb"+ ],+ "startDate": "2025-01-08",+ "endDate": "2025-01-29",+ "granuleDateRanges": [+ ["2025-01-08", "2025-01-09"],+ ["2025-01-09", "2025-01-10"],+ ["2025-01-10", "2025-01-11"],+ ["2025-01-13", "2025-01-14"],+ ["2025-01-14", "2025-01-15"],+ ["2025-01-16", "2025-01-17"],+ ["2025-01-18", "2025-01-19"],+ ["2025-01-20", "2025-01-21"],+ ["2025-01-28", "2025-01-29"]+ ],+ "disableSnapshot": true,+ "layergroup": "Corrected Reflectance",+ "wrapX": true,+ "projections": {+ "geographic": {+ "source": "MAXAR:wmts",+ "matrixSet": "GoogleMapsCompatible19"+ }+ }+ }+ }+}\ No newline at end of filediff --git a/config/default/common/config/wv.json/measurements/Disaster Response.json b/config/default/common/config/wv.json/measurements/Disaster Response.jsonnew file mode 100644index 000000000..7bce7b831--- /dev/null+++ b/config/default/common/config/wv.json/measurements/Disaster Response.json@@ -0,0 +1,20 @@+{+ "measurements": {+ "Disaster Response": {+ "id": "disaster-response",+ "title": "Disaster Response",+ "subtitle": "Assorted Sources",+ "sources": {+ "NOAA_2025_ERI_WMTS": {+ "id": "NOAA_2025_ERI_WMTS",+ "title": "Maxar Constellation and NOAA",+ "description": "",+ "image": "",+ "settings": [+ "NOAA_2025_ERI_WMTS"+ ]+ }+ }+ }+ }+}diff --git a/config/default/common/config/wv.json/measurements/Featured - Disaster Response.json b/config/default/common/config/wv.json/measurements/Featured - Disaster Response.jsonnew file mode 100644index 000000000..0cb441db1--- /dev/null+++ b/config/default/common/config/wv.json/measurements/Featured - Disaster Response.json@@ -0,0 +1,20 @@+{+ "measurements": {+ "Disaster Response - Featured": {+ "id": "featured-disaster-response",+ "title": "Disaster Response",+ "subtitle": "Assorted Sources",+ "sources": {+ "NOAA_2025_ERI_WMTS": {+ "id": "NOAA_2025_ERI_WMTS",+ "title": "Maxar Constellation and NOAA",+ "description": "",+ "image": "",+ "settings": [+ "NOAA_2025_ERI_WMTS"+ ]+ }+ }+ }+ }+}diff --git a/config/default/common/config/wv.json/projections/geographic.json b/config/default/common/config/wv.json/projections/geographic.jsonindex 6b312ee8e..c46298810 100644--- a/config/default/common/config/wv.json/projections/geographic.json+++ b/config/default/common/config/wv.json/projections/geographic.json@@ -30,7 +30,7 @@0.00054931640625,0.00027465820313],- "numZoomLevels": 12,+ "numZoomLevels": 21,"startCenter": [0,0diff --git a/config/default/release/config/wv.json/sources.json b/config/default/release/config/wv.json/sources.jsonindex 7b39bf7de..8b4694ce0 100644--- a/config/default/release/config/wv.json/sources.json+++ b/config/default/release/config/wv.json/sources.json@@ -24,6 +24,125 @@"FIRMS:xyz": {"url": "https://firms.modaps.eosdis.nasa.gov/layers"},+ "MAXAR:wmts": {+ "url": "https://stormscdn.ngs.noaa.gov",+ "matrixSets": {+ "GoogleMapsCompatible19": {+ "id": "GoogleMapsCompatible19",+ "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,+ 0.0001373291015625,+ 6.866455078125e-05,+ 3.4332275390625e-05,+ 1.71661376953125e-05,+ 8.58306884765625e-06,+ 4.291534423828125e-06,+ 2.1457672119140625e-06,+ 1.0728836059570312e-06,+ 5.364418029785156e-07+ ],+ "tileSize": [256, 256],+ "tileMatrices": [+ {+ "matrixWidth": 1,+ "matrixHeight": 1+ },+ {+ "matrixWidth": 2,+ "matrixHeight": 2+ },+ {+ "matrixWidth": 8,+ "matrixHeight": 8+ },+ {+ "matrixWidth": 16,+ "matrixHeight": 16+ },+ {+ "matrixWidth": 32,+ "matrixHeight": 32+ },+ {+ "matrixWidth": 64,+ "matrixHeight": 64+ },+ {+ "matrixWidth": 128,+ "matrixHeight": 128+ },+ {+ "matrixWidth": 256,+ "matrixHeight": 256+ },+ {+ "matrixWidth": 512,+ "matrixHeight": 512+ },+ {+ "matrixWidth": 1024,+ "matrixHeight": 1024+ },+ {+ "matrixWidth": 2048,+ "matrixHeight": 2048+ },+ {+ "matrixWidth": 4096,+ "matrixHeight": 4096+ },+ {+ "matrixWidth": 8192,+ "matrixHeight": 8192+ },+ {+ "matrixWidth": 16384,+ "matrixHeight": 16384+ },+ {+ "matrixWidth": 32768,+ "matrixHeight": 32768+ },+ {+ "matrixWidth": 65536,+ "matrixHeight": 65536+ },+ {+ "matrixWidth": 131072,+ "matrixHeight": 131072+ },+ {+ "matrixWidth": 262144,+ "matrixHeight": 262144+ },+ {+ "matrixWidth": 524288,+ "matrixHeight": 524288+ },+ {+ "matrixWidth": 1048576,+ "matrixHeight": 1048576+ },+ {+ "matrixWidth": 2097152,+ "matrixHeight": 2097152+ }+ ]+ }+ }+ },"DDV": {"url": "https://kv9drwgv6l.execute-api.us-west-2.amazonaws.com/","matrixSets": {diff --git a/e2e/features/layers/layer-picker-test.spec.js b/e2e/features/layers/layer-picker-test.spec.jsindex 0e8198711..829f816d6 100644--- a/e2e/features/layers/layer-picker-test.spec.js+++ b/e2e/features/layers/layer-picker-test.spec.js@@ -155,8 +155,8 @@ test('Disabling coverage filter updates list', async () => {} = selectorsawait availableFilterCheckbox.click()await expect(availableFilterCheckboxInput).not.toBeChecked()- await expect(layersSearchRow).toHaveCount(16)- await expect(layerResultsCountText).toContainText('Showing 16 out of')+ await expect(layersSearchRow).toHaveCount(17)+ await expect(layerResultsCountText).toContainText('Showing 17 out of')})test('Finding layer by ID with search', async () => {diff --git a/tasks/build-options/getVisMetadata.js b/tasks/build-options/getVisMetadata.jsindex 88f0da4b1..f4a0be115 100644--- a/tasks/build-options/getVisMetadata.js+++ b/tasks/build-options/getVisMetadata.js@@ -98,7 +98,8 @@ const skipLayers = ['AERONET_AOD_500NM','AERONET_ANGSTROM_440-870NM','DAILY_AERONET_AOD_500NM',- 'DAILY_AERONET_ANGSTROM_440-870NM'+ 'DAILY_AERONET_ANGSTROM_440-870NM',+ 'NOAA_2025_ERI_WMTS']// NOTE: Only using these properties at this timediff --git a/web/images/layers/previews/geographic/NOAA_2025_ERI_WMTS.jpg b/web/images/layers/previews/geographic/NOAA_2025_ERI_WMTS.jpgnew file mode 100644index 000000000..605a3e9b1Binary files /dev/null and b/web/images/layers/previews/geographic/NOAA_2025_ERI_WMTS.jpg differdiff --git a/web/js/map/layerbuilder.js b/web/js/map/layerbuilder.jsindex 51f508747..e2d21b6da 100644--- a/web/js/map/layerbuilder.js+++ b/web/js/map/layerbuilder.js@@ -65,15 +65,15 @@ export default function mapLayerBuilder(config, cache, store) {* @param {*} attributes* @param {*} wrapLayer*/- const getLayer = (createLayerFunc, def, options, attributes, wrapLayer) => {+ const getLayer = async (createLayerFunc, def, options, attributes, wrapLayer) => {const state = store.getState();- const layer = createLayerFunc(def, options, null, state, attributes);+ const layer = await createLayerFunc(def, options, null, state, attributes);layer.wv = attributes;if (!wrapLayer) {return layer;}- const layerNext = createLayerFunc(def, options, 1, state, attributes);- const layerPrior = createLayerFunc(def, options, -1, state, attributes);+ const layerNext = await createLayerFunc(def, options, 1, state, attributes);+ const layerPrior = await createLayerFunc(def, options, -1, state, attributes);layerPrior.wv = attributes;layerNext.wv = attributes;@@ -137,7 +137,7 @@ export default function mapLayerBuilder(config, cache, store) {* @param {object} options Layer options* @return {object} Closest date*/- const getRequestDates = function(def, options) {+ const getRequestDates = (def, options) => {const state = store.getState();const { date } = state;const { appNow } = date;@@ -331,7 +331,7 @@ export default function mapLayerBuilder(config, cache, store) {* @param {object} state* @returns {object} OpenLayers WMTS layer*/- function createLayerWMTS (def, options, day, state) {+ const createLayerWMTS = (def, options, day, state) => {const { proj } = state;const {id, layer, format, matrixIds, matrixSet, matrixSetLimits, period, source, style, wrapadjacentdays, type,@@ -399,7 +399,7 @@ export default function mapLayerBuilder(config, cache, store) {preload: 0,source: tileSource,});- }+ };const { getGranuleLayer } = granuleLayerBuilder(cache, store, createLayerWMTS);@@ -412,7 +412,7 @@ export default function mapLayerBuilder(config, cache, store) {* @param {object} options - Layer options* @returns {object} OpenLayers WMS layer*/- const createLayerWMS = function(def, options, day, state) {+ const createLayerWMS = (def, options, day, state) => {const { proj } = state;const selectedProj = proj.selected;let urlParameters;@@ -500,7 +500,7 @@ export default function mapLayerBuilder(config, cache, store) {* @param {object} state* @param {object} attributes*/- const createLayerVectorAeronet = function(def, options, day, state, attributes) {+ const createLayerVectorAeronet = (def, options, day, state, attributes) => {const { proj, animation } = state;let date;let gridExtent;@@ -739,7 +739,7 @@ export default function mapLayerBuilder(config, cache, store) {* @param {object} state* @param {object} attributes*/- const createLayerVector = function(def, options, day, state, attributes) {+ const createLayerVector = (def, options, day, state, attributes) => {if (def.source === 'AERONET') {return createLayerVectorAeronet(def, options, day, state, attributes);}@@ -1109,6 +1109,55 @@ export default function mapLayerBuilder(config, cache, store) {return layer;};+ const createLayerCompositeWMTS = async (def, options, day, state) => {+ const { proj } = state;+ const { shifted, date } = options;+ const selectedDate = date || getSelectedDate(state);+ const isoDate = selectedDate.toISOString();+ const selectedDateString = isoDate.split('T')[0].split('-').join('');+ const matchedLayers = def.layers.filter((layerName) => layerName.match(/([0-9])+/g)[0] === selectedDateString);+ // create wmts defs from def.layers+ const wmtsDefs = matchedLayers.map((layerID) => ({+ ...def,+ id: layerID,+ layerName: layerID,+ type: 'wmts',+ layers: undefined,+ }));+ // create layers from defs+ const layers = wmtsDefs.map((wmtsDef) => {+ const {+ matrixSet,+ source,+ layerName,+ format,+ matrixSetLimits,+ } = wmtsDef;+ const configSource = config.sources[source];+ const configMatrixSet = configSource.matrixSets[matrixSet];+ const { extent } = calcExtentsFromLimits(configMatrixSet, matrixSetLimits, day, proj.selected);++ const sourceOptions = {+ url: `${configSource.url}/${layerName}/{z}/{x}/{y}`,+ layer: layerName,+ crossOrigin: 'anonymous',+ format,+ wrapX: false,+ projection: 'EPSG:3857',+ maxZoom: 21,+ };+ const tileSource = new OlSourceXYZ(sourceOptions);++ return new OlLayerTile({+ source: tileSource,+ className: wmtsDef.id,+ extent: shifted ? RIGHT_WING_EXTENT : extent,+ });+ });+ const layer = new OlLayerGroup({ layers });+ return layer;+ };+/*** Create a new OpenLayers Layer* @param {object} def@@ -1160,19 +1209,22 @@ export default function mapLayerBuilder(config, cache, store) {if (!isGranule) {switch (def.type) {case 'wmts':- layer = getLayer(createLayerWMTS, def, options, attributes, wrapLayer);+ layer = await getLayer(createLayerWMTS, def, options, attributes, wrapLayer);break;case 'vector':layer = await getLayer(createLayerVector, def, options, attributes, wrapLayer);break;case 'wms':- layer = getLayer(createLayerWMS, def, options, attributes, wrapLayer);+ layer = await getLayer(createLayerWMS, def, options, attributes, wrapLayer);break;case 'titiler':layer = await getLayer(createTitilerLayer, def, options, attributes, wrapLayer);break;case 'xyz':- layer = getLayer(createXYZLayer, def, options, attributes, wrapLayer);+ layer = await getLayer(createXYZLayer, def, options, attributes, wrapLayer);+ break;+ case 'composite:wmts':+ layer = await getLayer(createLayerCompositeWMTS, def, options, attributes, wrapLayer);break;default:throw new Error(`Unknown layer type: ${type}`);diff --git a/web/js/mapUI/components/update-collections/updateCollections.js b/web/js/mapUI/components/update-collections/updateCollections.jsindex 9c65ce1e5..ccccc6b3d 100644--- a/web/js/mapUI/components/update-collections/updateCollections.js+++ b/web/js/mapUI/components/update-collections/updateCollections.js@@ -30,11 +30,10 @@ function UpdateCollections () {const { id, period } = def;const { matrixSet } = def.projections[proj.id];const isoStringDate = util.toISOStringSeconds(util.roundTimeOneMinute(selectedDate));- const imageType = def.format === 'image/png' ? 'png' : 'jpeg';const sourceDomain = lookupLayerSource(id);- const sourceUrl = `${sourceDomain}?TIME=${isoStringDate}&layer=${id}&style=default&tilematrixset=${matrixSet}&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2F${imageType}&TileMatrix=0&TileCol=0&TileRow=0`;+ const sourceUrl = `${sourceDomain}?TIME=${isoStringDate}&layer=${id}&style=default&tilematrixset=${matrixSet}&Service=WMTS&Request=GetTile&Version=1.0.0&Format=${encodeURIComponent(def.format)}&TileMatrix=0&TileCol=0&TileRow=0`;try {const response = await fetch(sourceUrl);diff --git a/web/js/modules/product-picker/format-config.js b/web/js/modules/product-picker/format-config.jsindex d2bc4c0be..be47637ed 100644--- a/web/js/modules/product-picker/format-config.js+++ b/web/js/modules/product-picker/format-config.js@@ -81,7 +81,7 @@ function setCoverageFacetProp(layer, selectedDate) {function setTypeProp(layer) {const { type } = layer;- const rasterTypes = ['wms', 'wmts', 'xyz'];+ const rasterTypes = ['wms', 'wmts', 'xyz', 'composite:wmts'];if (rasterTypes.includes(type)) {layer.type = 'Raster (Mosaicked)';}