diff --git a/raster_api/runtime/src/cmap_data/README.md b/raster_api/runtime/src/cmap_data/README.md index 1a489350..1ad7b09e 100644 --- a/raster_api/runtime/src/cmap_data/README.md +++ b/raster_api/runtime/src/cmap_data/README.md @@ -109,4 +109,29 @@ for k in texture_categories.keys(): cmap[int(k)] = np.array(parse_color(texture_categories[k])) np.save("soil_texture.npy", cmap) +``` + +##### Tornadoes colormap + +```python +from rio_tiler.colormap import parse_color +import numpy as np + +# Colormap for Enhanced Fujita (EF) scale ratings +tornado_ef_scale = { + "0": "#add8e6", #EF0 + "1": "#90ee90", #EF1 + "2": "#ffe71f", #EF2 + "3": "#ffa500", #EF3 + "4": "#ff0000", #EF4 + "5": "#ff00ff", #EF5 + "6": "#b3bcc9", #EFU +} + +cmap = np.zeros((256, 4), dtype=np.uint8) +cmap[:] = np.array([0, 0, 0, 255]) +for k in tornado_ef_scale.keys(): + cmap[int(k)] = np.array(parse_color(tornado_ef_scale[k])) + +np.save("tornado_ef_scale.npy", cmap) ``` \ No newline at end of file diff --git a/raster_api/runtime/src/cmap_data/tornado_ef_scale.npy b/raster_api/runtime/src/cmap_data/tornado_ef_scale.npy new file mode 100644 index 00000000..f9152814 Binary files /dev/null and b/raster_api/runtime/src/cmap_data/tornado_ef_scale.npy differ