Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fixed colormap merge error

Benjamine8ee1d84a527
diff --git a/bin/wv-options-colormap b/bin/wv-options-colormap
index 4c0917afd..9a80bf8da 100755
--- a/bin/wv-options-colormap
+++ b/bin/wv-options-colormap
@@ -142,12 +142,15 @@ def process_entries(colormap):
return "transparent"
color_format = "{0:02x}{1:02x}{2:02x}{3:02x}"
for index, entry in enumerate(entries):
+ legend = match_legend(entry, legends)
+ if (legend == "false"):
+ continue
r,g,b = entry["@rgb"].split(",")
a = 0 if entry.get("@transparent", "false") == "true" else 255
if a == 0:
continue
colors += [color_format.format(int(r), int(g), int(b), a)]
- legend = match_legend(entry, legends)
+
if "@tooltip" not in legend:
raise KeyError("No tooltips in legend")
tooltip = legend["@tooltip"]