AddOverviewConstraints — Tag a raster column as being an overview of another.
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)
;
Adds constraints on a raster column that are used to display information in the raster_overviews
raster catalog.
The ovfactor
parameter represents the scale multiplier in the overview column: higher overview factors have lower resolution.
When the ovschema
and refschema
parameters are omitted, the first table found scanning the search_path
will be used.
Disponibilidad: 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)