I am trying to embed a color table into a raster using Python and GDAL without success. I was trying to follow the example here
colors = gdal.ColorTable()
with open(color, 'r') as f:
lines = f.readlines()
for line in lines:
temp = tuple(line.split(" ")[:4])
tempi = [eval(i) for i in temp]
send = tempi[0], tuple(tempi[1:4])
print(send)
colors.SetColorEntry(send)
this is this first item sent to colors.SetColorEntry (from a call to print)
(1, (115, 92, 64))
and traceback shows the error
TypeError: ColorTable_SetColorEntry expected 3 arguments, got 2
Can anyone shed some light on this and send me in the right direction? What other argument is it wanting?