Interactive interface for browsing global, full-resolution satellite imagery
WV-894: Inactive layers must now be explicit
Mike McGannb4b131c20608
diff --git a/bin/wv-options-validate b/bin/wv-options-validateindex f10cb1ee7..d70243ce0 100755--- a/bin/wv-options-validate+++ b/bin/wv-options-validate@@ -114,7 +114,11 @@ for layer_id in wv["layers"].keys():error("[%s:%s] Invalid matrix set: %s" %(layer_id, proj_id, matrix_set))del layer["projections"][proj_id]-+ if layer.get("inactive", False):+ pass+ else:+ if "endDate" in layer:+ del layer["endDate"]for layer_id in wv["layerOrder"]:if layer_id not in wv["layers"]:diff --git a/bin/wv-options-wmts b/bin/wv-options-wmtsindex 014bb49c6..fb871f5c0 100755--- a/bin/wv-options-wmts+++ b/bin/wv-options-wmts@@ -94,12 +94,8 @@ def process_layer(gc_layer, wv_layers, colormaps):datetime.strptime(times[0], "%Y-%m-%d"))end_date = min(start_date,datetime.strptime(times[1], "%Y-%m-%d"))- # Layer is still actively being produced if the end date- # greater than yesterday- yesterday = datetime.now() - timedelta(days=1)wv_layer["startDate"] = start_date.strftime("%Y-%m-%d")- if end_date < yesterday:- wv_layer["endDate"] = end_date.strftime("%Y-%m-%d")+ wv_layer["endDate"] = end_date.strftime("%Y-%m-%d")except ValueError:raise Exception("Invalid time: {0}".format(range))