ST_BandMetaData — 지정 래스터 밴드에 대한 기본 메타데이터를 반환합니다. 밴드를 지정하지 않을 경우 밴드 1번이라고 가정합니다.
(1) record ST_BandMetaData(
raster rast, integer band=1)
;
(2) record ST_BandMetaData(
raster rast, integer[] band)
;
Returns basic meta data about a raster band. Columns returned: pixeltype, nodatavalue, isoutdb, path, outdbbandnum, filesize, filetimestamp.
래스터가 어떤 밴드도 담고 있지 않을 경우 오류가 발생합니다. |
If band has no NODATA value, nodatavalue are NULL. |
If isoutdb is False, path, outdbbandnum, filesize and filetimestamp are NULL. If outdb access is disabled, filesize and filetimestamp will also be NULL. |
Enhanced: 2.5.0 to include outdbbandnum, filesize and filetimestamp for outdb rasters.
SELECT rid, (foo.md).* FROM ( SELECT rid, ST_BandMetaData(rast, 1) AS md FROM dummy_rast WHERE rid=2 ) As foo; rid | pixeltype | nodatavalue | isoutdb | path | outdbbandnum -----+-----------+---- --------+---------+------+-------------- 2 | 8BUI | 0 | f | |
WITH foo AS ( SELECT ST_AddBand(NULL::raster, '/home/pele/devel/geo/postgis-git/raster/test/regress/loader/Projected.tif', NULL::int[]) AS rast ) SELECT * FROM ST_BandMetadata( (SELECT rast FROM foo), ARRAY[1,3,2]::int[] ); bandnum | pixeltype | nodatavalue | isoutdb | path | outdbbandnum | filesize | filetimestamp | ---------+-----------+-------------+---------+--------------------------------------------------------------------------------+---------------+----------+---------------+- 1 | 8BUI | | t | /home/pele/devel/geo/postgis-git/raster/test/regress/loader/Projected.tif | 1 | 12345 | 1521807257 | 3 | 8BUI | | t | /home/pele/devel/geo/postgis-git/raster/test/regress/loader/Projected.tif | 3 | 12345 | 1521807257 | 2 | 8BUI | | t | /home/pele/devel/geo/postgis-git/raster/test/regress/loader/Projected.tif | 2 | 12345 | 1521807257 |