Skip to content

Commit 0e254be

Browse files
authored
fix(surface): Fix lookup table generation for applying raster colormap (#998)
1 parent 89ac5d4 commit 0e254be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lonboard/experimental/_surface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def apply_colormap(
5555
cmap: dict[int, tuple[int, int, int] | tuple[int, int, int, int]],
5656
) -> NDArray[np.uint8]:
5757
"""Apply rasterio colormap to single-band array."""
58-
lut = np.zeros((max(cmap.keys()), 4), dtype=np.uint8)
58+
lut = np.zeros((max(cmap.keys()) + 1, 4), dtype=np.uint8)
5959
for k, v in cmap.items():
6060
lut[k] = v
6161

0 commit comments

Comments
 (0)