Database Reference
In-Depth Information
thesameorappropriateattributes.Thestandardconstraintscomprisethefollowing
rules:
Width and height : This rule states that all the rasters must have the same
width and height
Scale X and Y :Thisrulestatesthatalltherastersmusthavethesamescale
X and Y
SRID : This rule states that all rasters must have the same SRID
Same alignment :Thisrulestatesthatallrastersmustbealignedtoonean-
other
Maximum extent :Thisrulestatesthatallrastersmustbewithinthetable's
maximum extent
Number of bands :Thisrulestatesthatallrastersmusthavethesamenum-
ber of bands
NODATA values : This rule states that all raster bands at a specific index
must have the same NODATA value
Out-db :Thisrulestatesthatallrasterbandsataspecificindexmustbe in-
db or out-db , not both
Pixel type :Thisrulestatesthatallrasterbandsataspecificindexmustbe
of the same pixel type
The error message indicates that we violated the out-db constraint. But we can't
accepttheerrormessageasisbecausewearenotdoinganythingrelatedto out-
db .Allwearedoingisaddingasecondbandtotheraster.Addingthesecondband
violatesthe out-db constraintbecausetheconstraintispreparedonlyforoneband
in the raster, not a raster with two bands.
Wewillhavetodroptheconstraints,makeourchanges,andreapplytheconstraints.
SELECT DropRasterConstraints('prism',
'rast'::name);
UPDATE prism SET
rast = ST_AddBand(
rast,
ST_MapAlgebra(rast, 1, '32BF',
'[rast] / 100.', -9
999),
1
Search WWH ::




Custom Search