Use the deleteColormap ST_Raster function to remove a color map from an ST_Raster value. Doing so renders the ST_Raster value in grayscale.
- Use an UPDATE SQL statement with the deleteColormap function to remove the color map from raster values in those rows in the vegetation table that have a type value equal to deciduous.
UPDATE VEGETATION t SET RASTER = t.raster.deleteColormap() WHERE TYPE = 'DECIDUOUS';
UPDATE vegetation SET raster = deleteColormap(raster) WHERE type = 'deciduous';
UPDATE vegetation SET raster = deleteColormap() WHERE type = 'deciduous';
After the deleteColormap successfully completes, the raster value renders as grayscale rather than a color-mapped value.