Removing a color map from an ST_Raster value
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.
Steps:
-
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.
Oracle
UPDATE VEGETATION t SET RASTER = t.raster.deleteColormap() WHERE TYPE = 'DECIDUOUS';
PostgreSQL
UPDATE vegetation SET raster = deleteColormap(raster) WHERE type = 'deciduous';
SQL Server
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.
Related Topics
2/5/2013