Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Make getVisMetadata skipLayers configurable.

Jason Hurley839f82348bc3
diff --git a/config/default/common/features.json b/config/default/common/features.json
index ac8903bde..7704da1aa 100644
--- a/config/default/common/features.json
+++ b/config/default/common/features.json
@@ -37,6 +37,7 @@
"AERONET": "AERONET"
}
},
+ "skipLayers": [],
"cmr": {
"url": "https://cmr.earthdata.nasa.gov/search/"
},
diff --git a/doc/features.md b/doc/features.md
index 169bae1bf..030931923 100644
--- a/doc/features.md
+++ b/doc/features.md
@@ -31,6 +31,19 @@ edit `config/default/common/features.json` and set `"smartHandoffs": true`.
This feature uses the [ArcGIS World Geocoding Service](https://developers.arcgis.com/rest/geocode/api-reference/overview-world-geocoding-service.htm) to find addresses based on input text, coordinates, and by clicking a spot on the map. To enable,
edit `config/default/common/features.json` and set `"locationSearch"` object `"url"` to use the ArcGIS request URL used by the [ArcGIS World Geocoding Service](https://developers.arcgis.com/rest/geocode/api-reference/overview-world-geocoding-service.htm).
+## Skipping Layer Metadata
+
+During the build process, Worldview fetches imagery layer metadata from the GIBS Layer Metadata API (see `vismetadata.url` in `config/default/common/features.json`) for every layer in the layer order. By default a fixed set of layers that do not exist in GIBS is skipped and won't be fetched. If you are serving your own layers, you can skip additional layers by adding their IDs to the `vismetadata.skipLayers` array:
+
+```
+"vismetadata": {
+ "url": "https://gibs.earthdata.nasa.gov/layer-metadata/v1.0/",
+ "skipLayers": ["your_internal_layer"]
+}
+```
+
+Layers listed here are skipped in addition to the default set, so existing behavior is preserved.
+
## URL Shortening
This feature uses
diff --git a/tasks/build-options/getVisMetadata.js b/tasks/build-options/getVisMetadata.js
index 0a2f6b1e8..6f91d1422 100644
--- a/tasks/build-options/getVisMetadata.js
+++ b/tasks/build-options/getVisMetadata.js
@@ -67,9 +67,10 @@ const outputFile = argv.layerMetadata
const metadataConfig = features.features.vismetadata
const url = metadataConfig.url
const daacMap = metadataConfig.daacMap || {}
+const configuredSkipLayers = metadataConfig.skipLayers || []
-// These are alias or otherwise layers that don't exist in GIBS
-const skipLayers = [
+// These are aliases or otherwise layers that don't exist in GIBS
+const defaultSkipLayers = [
'Land_Water_Map',
'Land_Mask',
'World_Database_on_Protected_Areas',
@@ -122,9 +123,10 @@ const skipLayers = [
'EUMETSAT_MSG_IDOC_IR108_10min',
'OPERA_L2_Radiometric_Terrain_Corrected_SAR_Sentinel-1_12Day',
'NISAR_L2_Geocoded_Polarimetric_Covariance_12Day'
-
]
+const skipLayers = defaultSkipLayers.concat(configuredSkipLayers)
+
// NOTE: Only using these properties at this time
const useKeys = [
'conceptIds',