Stars seems to plot geotifs with colours from a lookup table of some sort (some plot as b and w, some with colour). Does anyone know how to access the lookup table? My google skills are letting me down...

#RStats #stars #SpatialScience #GIS

@michcampbell possibly can't with stars, but maybe sf provides it

happy to explore if you have an example, I have *palette* geotiffs on hand but not raster attribute table, which sounds like you have RAT not pal - can you share the file? (it is a bit of a dusty corner, supported by GDAL but not exposed enough, I had to deep dive this last year but don't have examples) x <- sf::gdal_read(...) has x$color_tables which might have rat for other types

@michcampbell ah, with read_stars(, proxy = FALSE) on a pallete you get attr(x[[1]], "colors") and attr(x[[1]], "levels") I'd leverage gdalraster to cut in finer, if it's really rat then there must be a sidecar file with the .tif .aux.xml (which can be much easier to delve into)
@mdsumner sorry for the late reply! Thanks! I abandoned the attempt, Realised it probably wasn't worth the time - hope you're having a great easter Tuesday!!