ST_MetaItems

更新时间:
复制 MD 格式

Returns the names of all customized metadata items stored on a raster or one of its bands as a text[] array. Use the returned key names with ST_MetaValue to retrieve the corresponding values.

Syntax

text[] ST_metaItems(raster raster_obj);
text[] ST_metaItems(raster raster_obj, integer band);

Parameters

ParameterDescription
raster_objThe raster whose customized metadata items you want to list.
bandThe sequence number of the band whose customized metadata items you want to list. Valid values start from 0.

Examples

List all customized metadata item names for a raster:

SELECT ST_MetaItems(raster_obj)
FROM raster_table;

Output:

{latitude#long_name,latitude#units,longitude#long_name,longitude#units,NC_GLOBAL#Conventions,NC_GLOBAL#history,NETCDF_DIM_EXTRA,NETCDF_DIM_time_DEF,NETCDF_DIM_time_VALUES}

List all customized metadata item names for band 0:

SELECT ST_MetaItems(raster_obj, 0)
FROM raster_table;

Output:

{add_offset,long_name,missing_value,NETCDF_DIM_time,NETCDF_VARNAME,scale_factor,units,_FillValue}

What's next

  • ST_MetaValue: Retrieve the value of a specific metadata item by key name.

  • ST_SetMetaValue: Add or update a customized metadata item on a raster or band.