ST_NoData

更新时间:
复制 MD 格式

Returns the predefined NoData value for a specified band of a raster object. If no NoData value is defined for the band, the function returns null.

Syntax

float8 ST_NoData(raster raster_obj, integer band);

Parameters

ParameterDescription
raster_objThe raster object.
bandThe band number to query. Band numbering starts at 0.

Example

Query the NoData value for band 0:

select ST_NoData(raster_obj, 0) from raster_table where id=1;

Output:

__________________________________
0.000
If no NoData value has been defined for the band, ST_NoData returns null. Check for null in downstream logic that filters or masks pixels based on this value.