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)