Open
Description
colormaps for rasters is currently not implemented for mapfiles. would be nice to add it. the challenge is that a single rule generates multiple classes, the code seems to only able to handle a single class per rule.
not sure how to improve that, suggestion for implementation of the rastersymbolizer
def _rasterSymbolizer(sl):
style=[]
if "colorMap" in sl:
colMap = sl["colorMap"]
prvQuantity = "0"
for entry in colMap["colorMapEntries"]:
stClass = {
"NAME": entry["label"],
"COLOR": entry["color"],
"EXPRESSION": "([PIXEL]> {0} AND [PIXEL]<= {1})".format(prvQuantity, entry["quantity"]),
"opacity": entry["opacity"],
}
prvQuantity = entry["quantity"]
style.append(stClass)
return style
Metadata
Assignees
Labels
No labels