ST_EraseOverview

更新时间:
复制 MD 格式

Fills a rectangular area of a raster object with zeros or a predefined NoData value.

Syntax

raster ST_EraseOverview(raster raster_obj, Box extent, BoxType type, boolean useNodata);

Parameters

ParameterTypeDescription
raster_objrasterThe raster object to modify.
extentBoxThe area to clear, in the format '((minX,minY),(maxX,maxY))'.
typeBoxTypeThe coordinate type used to interpret extent. Set to Raster for pixel coordinates or World for world coordinates.
useNodatabooleanSpecifies whether to fill the cleared area with the predefined NoData value. If set to false, or if no NoData value is defined, the area is filled with 0.

Example

The following example clears the pixel region from (0,0) to (100,100) in the raster object where id=100, filling it with 0.

SELECT ST_EraseOverview(raster_obj, '((0,0),(100,100))', 'Raster', false)
FROM raster_table
WHERE id = 100;