AddOverviewConstraints — 将一个栅格列标记为另一个栅格列的总览。
boolean
AddOverviewConstraints
(
name
ovschema
, name
ovtable
, name
ovcolumn
, name
refschema
, name
reftable
, name
refcolumn
, int
ovfactor
)
;
boolean
AddOverviewConstraints
(
name
ovtable
, name
ovcolumn
, name
reftable
, name
refcolumn
, int
ovfactor
)
;
添加对栅格列的约束,这些约束用于在
raster_overviews
栅格目录。
这个
ovfactor
参数表示总览列中的比例乘数:总览系数越高,分辨率越低。
当
ovschema
和
refschema
参数,则第一个找到的表将扫描
search_path
将会被使用。
可用性:2.0.0
CREATE TABLE res1 AS SELECT
ST_AddBand(
ST_MakeEmptyRaster(1000, 1000, 0, 0, 2),
1, '8BSI'::text, -129, NULL
) r1;
CREATE TABLE res2 AS SELECT
ST_AddBand(
ST_MakeEmptyRaster(500, 500, 0, 0, 4),
1, '8BSI'::text, -129, NULL
) r2;
SELECT AddOverviewConstraints('res2', 'r2', 'res1', 'r1', 2);
-- verify if registered correctly in the raster_overviews view --
SELECT o_table_name ot, o_raster_column oc,
r_table_name rt, r_raster_column rc,
overview_factor f
FROM raster_overviews WHERE o_table_name = 'res2';
ot | oc | rt | rc | f
------+----+------+----+---
res2 | r2 | res1 | r1 | 2
(1 row)