Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Reorder of Water Mask and added palette

Mike McGann070f4f66341f
diff --git a/data/config b/data/config
index b939caa44..d2f6db0d5 100644
--- a/data/config
+++ b/data/config
@@ -7108,6 +7108,19 @@
}
]
},
+ "MODIS_Water_Mask": {
+ "id": "MODIS_Water_Mask",
+ "source": "rendered",
+ "stops": [
+ {
+ "a": 255,
+ "at": 0,
+ "b": 255,
+ "g": 248,
+ "r": 168
+ }
+ ]
+ },
"MODIS_Water_Vapor_5km": {
"id": "MODIS_Water_Vapor_5km",
"source": "rendered",
@@ -45821,6 +45834,7 @@
"units": "cm"
},
"MODIS_Water_Mask": {
+ "bins": 1,
"description": "Terra and Aqua / MODIS, SRTM",
"name": "Water Mask",
"product": "static",
@@ -45858,6 +45872,7 @@
512
]
},
+ "rendered": "MODIS_Water_Mask",
"type": "wmts"
},
"OMI_Absorbing_Aerosol_Optical_Depth": {
diff --git a/data/geographic_ap_products.php b/data/geographic_ap_products.php
index 50e82695f..ffd778bcf 100644
--- a/data/geographic_ap_products.php
+++ b/data/geographic_ap_products.php
@@ -941,6 +941,12 @@
"value" => "AIRS_Precipitation_Night",
"type" => "multi", "category" => "overlays"
),
+ array(
+ "label" => "Water Mask",
+ "sublabel" => "Terra and Aqua / MODIS, SRTM",
+ "value" => "MODIS_Water_Mask",
+ "type" => "multi", "category" => "overlays"
+ ),
array(
"label" => "Flood Hazard:Frequency and Distribution",
"sublabel" => "SEDAC Global Flood Hazard Frequency and Distribution, v1 (1985–2003)",
@@ -958,12 +964,6 @@
"sublabel" => "SEDAC Global Flood Proportional Economic Loss Risk Deciles, v1 (2000)",
"value" => "ndh-flood-proportional-economic-loss-risk-deciles",
"type" => "multi", "category" => "overlays"
- ),
- array(
- "label" => "Water Mask",
- "sublabel" => "Terra and Aqua / MODIS, SRTM",
- "value" => "MODIS_Water_Mask",
- "type" => "multi", "category" => "overlays"
)
),
@@ -1425,6 +1425,12 @@
"value" => "ol_graticule",
"type" => "multi", "category" => "overlays"
),
+ array(
+ "label" => "Water Mask",
+ "sublabel" => "Terra and Aqua / MODIS, SRTM",
+ "value" => "MODIS_Water_Mask",
+ "type" => "multi", "category" => "overlays"
+ ),
array(
"label" => "Areas of No Data (mask)",
"sublabel" => "Terra / MODIS",
@@ -1472,13 +1478,7 @@
"sublabel" => "Space-Track.org / Aura",
"value" => "Aura_Orbit_Dsc",
"type" => "multi", "category" => "overlays"
- ),
- array(
- "label" => "Water Mask",
- "sublabel" => "Terra and Aqua / MODIS, SRTM",
- "value" => "MODIS_Water_Mask",
- "type" => "multi", "category" => "overlays"
- )
+ )
),
"Other" => array(
@@ -1530,6 +1530,12 @@
"value" => "ol_graticule",
"type" => "multi", "category" => "overlays"
),
+ array(
+ "label" => "Water Mask",
+ "sublabel" => "Terra and Aqua / MODIS, SRTM",
+ "value" => "MODIS_Water_Mask",
+ "type" => "multi", "category" => "overlays"
+ ),
array(
"label" => "Areas of No Data (mask)",
"sublabel" => "Terra / MODIS",
@@ -1577,13 +1583,7 @@
"sublabel" => "Space-Track.org / Aura",
"value" => "Aura_Orbit_Dsc",
"type" => "multi", "category" => "overlays"
- ),
- array(
- "label" => "Water Mask",
- "sublabel" => "Terra and Aqua / MODIS, SRTM",
- "value" => "MODIS_Water_Mask",
- "type" => "multi", "category" => "overlays"
- )
+ )
),
"palettes" => array(
"AIRS_Precipitation_Day" => array(
diff --git a/dev/generate-config/config/products/MODIS_Water_Mask.json b/dev/generate-config/config/products/MODIS_Water_Mask.json
index 917ff313c..b21f62694 100644
--- a/dev/generate-config/config/products/MODIS_Water_Mask.json
+++ b/dev/generate-config/config/products/MODIS_Water_Mask.json
@@ -1,4 +1,5 @@
{
+ "bins": 1,
"description": "Terra and Aqua / MODIS, SRTM",
"name": "Water Mask",
"product": "static",
@@ -36,5 +37,6 @@
512
]
},
+ "rendered": "MODIS_Water_Mask",
"type": "wmts"
}
\ No newline at end of file
diff --git a/dev/generate-config/generate-config.py b/dev/generate-config/generate-config.py
index 26b8bf882..49145f46c 100755
--- a/dev/generate-config/generate-config.py
+++ b/dev/generate-config/generate-config.py
@@ -16,7 +16,7 @@ import json
prog = os.path.basename(__file__)
basedir = os.path.dirname(__file__)
-version = "1.2.0"
+version = "1.2.1"
help_description = """\
Concatenates all configuration items a directory into one configuration file.
"""
@@ -68,9 +68,14 @@ for root, dirs, files in os.walk(options.config_dir):
continue
notify("Reading: %s/%s\n" % (root, file))
id = os.path.splitext(file)[0]
- with open(os.path.join(root, file)) as fp:
- item = json.load(fp)
- current[id] = item
+ filename = os.path.join(root, file)
+ try:
+ with open(filename) as fp:
+ item = json.load(fp)
+ current[id] = item
+ except Exception as e:
+ sys.stderr.write("%s: Unable to read %s: %s\n" % (prog, filename,
+ str(e)))
json_options = {
"sort_keys": True
diff --git a/js/bank.js b/js/bank.js
index d255c6beb..f0f7b979d 100644
--- a/js/bank.js
+++ b/js/bank.js
@@ -104,8 +104,12 @@ SOTE.widget.Bank.handleMetaSuccess = function(data,status,xhr,args){
var product = self.config.products[name];
if ( "rendered" in product ) {
meta.units = product.units;
- meta.min = product.min;
- meta.max = product.max;
+ meta.min = ( product.min === undefined )
+ ? "   &nbsp"
+ : product.min;
+ meta.max = ( product.max === undefined )
+ ? "   "
+ : product.max;
meta.bins = product.bins;
meta.stops = product.stops;
meta.palette = self.config.palettes[product.rendered];