Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Updated description for Freeze/Thaw

Mike McGann8cfe1e3b0d28
diff --git a/Gruntfile.js b/Gruntfile.js
index 06cf22b7c..e4c2a264b 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -139,18 +139,16 @@ module.exports = function(grunt) {
// Combine all configuration json files into one.
config: {
- command: "python etc/config/generate-config.py " +
- "--config-dir build/config " +
- "--output build/worldview-debug/web/data/config.json"
+ command: "bin/conf-cat > " +
+ "build/worldview-debug/web/data/config.json"
},
// Create a minified verison of the configuration file for
// the release web root.
config_min: {
- command: "python etc/config/generate-config.py " +
- "--config-dir build/config " +
+ command: "bin/conf-cat " +
"--minify " +
- "--output build/config.min.json"
+ "> build/config.min.json"
},
// Creates a combined configuration file for use in the source
diff --git a/bin/conf-cat b/bin/conf-cat
index 5a48874a4..93868736f 100755
--- a/bin/conf-cat
+++ b/bin/conf-cat
@@ -1,10 +1,18 @@
#!/usr/bin/python
from copy import deepcopy
+from optparse import OptionParser
import os
import sys
import json
+prog = os.path.basename(__file__)
+base_dir = os.path.join(os.path.dirname(__file__), "..")
+version = "1.0.0"
+help_description = """\
+Concatenates all configuration items a directory into one configuration file.
+"""
+
# dict_merge from
# http://blog.impressiver.com/post/31434674390/deep-merge-multiple-python-dicts
def dict_merge(target, *args):
@@ -25,8 +33,14 @@ def dict_merge(target, *args):
target[k] = deepcopy(v)
return target
-
-base_dir = os.path.join(os.path.dirname(__file__), "..")
+
+# MAIN
+parser = OptionParser(usage="Usage: %s [options]" % prog,
+ version="%s version %s" % (prog, version),
+ epilog=help_description)
+parser.add_option("-m", "--minify", action="store_true",
+ help="minify the output instead of pretty printing")
+(options, args) = parser.parse_args()
input_dir = os.path.join(base_dir, "conf", "web")
conf = {}
@@ -38,8 +52,9 @@ for root, dirs, files in os.walk(input_dir):
dict_merge(conf, data)
json_options = {}
-json_options["indent"] = 4
-json_options["separators"] = (',', ': ')
+if not options.minify:
+ json_options["indent"] = 4
+ json_options["separators"] = (',', ': ')
print json.dumps(conf, **json_options)
diff --git a/conf/web/layers/measures/MEaSUREs_Daily_Landscape_Freeze_Thaw.json b/conf/web/layers/measures/MEaSUREs_Daily_Landscape_Freeze_Thaw.json
index cc7e7873b..eb0bf526d 100644
--- a/conf/web/layers/measures/MEaSUREs_Daily_Landscape_Freeze_Thaw.json
+++ b/conf/web/layers/measures/MEaSUREs_Daily_Landscape_Freeze_Thaw.json
@@ -3,7 +3,7 @@
"MEaSUREs_Daily_Landscape_Freeze_Thaw": {
"id": "MEaSUREs_Daily_Landscape_Freeze_Thaw",
"title": "Freeze/Thaw (Daily Landscape)",
- "subtitle": "Aqua / MODIS / NSIDC",
+ "subtitle": "Aqua / AMSR-E / NSIDC",
"group": "overlays",
"period": "daily",
"format": "image/png",
diff --git a/src/js/main.js b/src/js/main.js
index 5d0f6a0a9..d0b9cc6b8 100644
--- a/src/js/main.js
+++ b/src/js/main.js
@@ -40,6 +40,7 @@ $(function() {// Initialize "static" vars
var storageEngine;
var init = function(config) {
loaded = true;
+ wv.config = config;
wv.ui.indicator.hide();
// set up storage and decide what to show
diff --git a/src/js/proj/wv.proj.change.js b/src/js/proj/wv.proj.change.js
index 144b3091a..3b1e37f45 100644
--- a/src/js/proj/wv.proj.change.js
+++ b/src/js/proj/wv.proj.change.js
@@ -68,7 +68,7 @@ wv.proj.change = wv.proj.change || function(models) {
self.events.trigger("select", self);
if ( !wasVisited && wasOld !== self.old ) {
checkNotify();
- Worldview.Map.COORDINATE_CONTROLS["arctic"].projection = self.crs;
+ Worldview.Map.COORDINATE_CONTROLS.arctic.projection = self.crs;
}
if ( wasOld !== self.old && self.old ) {