Deleting statistics from an ST_Raster value

In certain circumstances, you might remove statistics from an ST_Raster value. For example, if the raster data has been color corrected, the presence of raster statistics on the ST_Raster value causes ArcGIS for Desktop to stretch the raster data when rendered in ArcMap. Stretching color-corrected rasters can cause the colors to appear distorted.

You can disable the stretch in ArcGIS for Desktop, but you would have to do that each time the color-corrected data is displayed. Therefore, to avoid having to do this, remove the raster statistics from the color-corrected raster. If the statistics are not present, the display renderer does not stretch the data.

To remove raster statistics, use the ST_Raster deleteStats function.

Steps:
  1. Remove the raster statistics from the raster value that is in a row with a name column value that equals box in the table canyons.

    Oracle

    UPDATE CANYONS t
    SET raster = t.raster.deleteStats()
    WHERE NAME = 'BOX';
    

    PostgreSQL

    UPDATE canyons
    SET raster = deleteStats(raster)
    WHERE name = 'box';
    

    SQL Server

    UPDATE canyons
    SET raster = raster.deleteStats()
    WHERE name = 'Box';
    

Related Topics

6/19/2015