Interactive interface for browsing global, full-resolution satellite imagery
updating worldview files to handle our multiple colorapst
Gibs User0a34da9cf421
diff --git a/bin/wv-options-fetch b/bin/wv-options-fetchindex d2ae4283f..a27b4578f 100755--- a/bin/wv-options-fetch+++ b/bin/wv-options-fetch@@ -6,7 +6,6 @@# the Earth Science Data and Information System (ESDIS) project.## Copyright (C) 2013 - 2014 United States Government as represented by the-# Administrator of the National Aeronautics and Space Administration.# All Rights Reserved.#@@ -17,6 +16,7 @@ import sysimport jsonimport urllib2 as urllibimport xmltodict+import tracebackprog = os.path.basename(__file__)base_dir = os.path.join(os.path.dirname(__file__), "..")@@ -57,7 +57,8 @@ def process_remote(entry):fp.write(contents)gc = xmltodict.parse(contents)- for layer in gc["Capabilities"]["Contents"]["Layer"]:+ try:+ for layer in gc["Capabilities"]["Contents"]["Layer"]:ident = layer["ows:Identifier"]if "ows:Metadata" in layer:if ident in config.get("skipPalettes", []):@@ -67,11 +68,19 @@ def process_remote(entry):warning_count += 1else:for item in layer["ows:Metadata"]:+ #if item != "@xlink:role":+ # continue++ #if layer["ows:Metadata"][item] == "http://earthdata.nasa.gov/gibs/metadata-type/colormap":if item["@xlink:role"] == "http://earthdata.nasa.gov/gibs/metadata-type/colormap/1.2":colormap_link = item["@xlink:href"]+ #colormap_link = layer["ows:Metadata"]["@xlink:href"]colormap_file = os.path.basename(colormap_link)colormap_id = os.path.splitext(colormap_file)[0]colormaps[colormap_id] = colormap_link+ except:+ print(ident)+ print(str(traceback.format_exc()))def process_colormaps():print "%s: Fetching %d colormaps" % (prog, len(colormaps))diff --git a/bin/wv-options-wmts b/bin/wv-options-wmtsindex f35a53953..94b9d5719 100755--- a/bin/wv-options-wmts+++ b/bin/wv-options-wmts@@ -119,8 +119,14 @@ def process_layer(gc_layer, wv_layers, colormaps):total_warning_count += 1else:for item in gc_layer["ows:Metadata"]:- if item["@xlink:role"] == "http://earthdata.nasa.gov/gibs/metadata-type/colormap/1.2":- colormap_link = item["@xlink:href"]++ if item != "@xlink:role":+ continue++ #if item["@xlink:role"] == "http://earthdata.nasa.gov/gibs/metadata-type/colormap/1.2":+ if gc_layer["ows:Metadata"][item] == "http://earthdata.nasa.gov/gibs/metadata-type/colormap":+ #colormap_link = item["@xlink:href"]+ colormap_link = gc_layer["ows:Metadata"]["@xlink:href"]colormap_file = os.path.basename(colormap_link)colormap_id = os.path.splitext(colormap_file)[0]