Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

data center facet

Jason Kent499a648db7b8
diff --git a/tasks/python3/getVisMetadata.py b/tasks/python3/getVisMetadata.py
index 803a2f512..c74b4c64f 100755
--- a/tasks/python3/getVisMetadata.py
+++ b/tasks/python3/getVisMetadata.py
@@ -16,7 +16,7 @@ input_file = args[1]
output_file = args[2]
# NOTE: Only using these properties at this time
-use_keys = ['conceptIds']
+use_keys = ['conceptIds', 'dataCenter']
layer_metadata = {}
def get_metadata(layer_id, base_url):
@@ -24,7 +24,17 @@ def get_metadata(layer_id, base_url):
if (response.status_code != 200):
print('%s WARNING: No metadata config found for [%s]' % (prog, layer_id))
return
- layer_metadata[layer_id] = response.json()
+ metadata = response.json()
+
+ if metadata.get('conceptIds', None) is not None:
+ for collection in metadata.get("conceptIds"):
+ dataCenter = collection.get("dataCenter", None)
+ if metadata.get("dataCenter", None) is None:
+ metadata["dataCenter"] = [dataCenter]
+ elif dataCenter not in metadata["dataCenter"]:
+ metadata["dataCenter"].append(dataCenter)
+
+ layer_metadata[layer_id] = metadata
# Remove any props we don't expect to use
metadata_keys = dict(layer_metadata[layer_id]).keys()
diff --git a/web/js/modules/product-picker/facet-config.js b/web/js/modules/product-picker/facet-config.js
index 170e57a73..3150334d2 100644
--- a/web/js/modules/product-picker/facet-config.js
+++ b/web/js/modules/product-picker/facet-config.js
@@ -54,4 +54,12 @@ export default [
tooltip: 'Whether the layer represents daytime or nighttime imagery or data',
hideZeroCount: true,
},
+ {
+ field: 'dataCenter',
+ label: 'Data Center',
+ filterType: 'any',
+ tooltip: '',
+ show: 30,
+ hideZeroCount: true,
+ },
];