| 3862 | Raster constraints can be set using one of the !AddRasterConstraints functions. |
| 3863 | |
| 3864 | 1. !AddRasterConstraints ( |
| 3865 | rastschema name,[[BR]] |
| 3866 | rasttable name,[[BR]] |
| 3867 | rastcolumn name,[[BR]] |
| 3868 | VARIADIC constraints text[] |
| 3869 | ) |
| 3870 | |
| 3871 | constraints: keywords indicating constraint to attempt to add. possible keywords are: |
| 3872 | |
| 3873 | {{{ |
| 3874 | srid |
| 3875 | scale_x or scalex |
| 3876 | scale_y or scaley |
| 3877 | scale |
| 3878 | blocksize_x or blocksizex or width |
| 3879 | blocksize_y or blocksizey or height |
| 3880 | blocksize |
| 3881 | same_alignment or samealignment or alignment |
| 3882 | regular_blocking or regularblocking |
| 3883 | num_bands or numbands |
| 3884 | pixel_types or pixeltypes |
| 3885 | nodata_values or nodatavalues or nodata |
| 3886 | extent |
| 3887 | }}} |
| 3888 | |
| 3889 | {{{ |
| 3890 | SELECT AddRasterConstraints('schema', 'table', 'rast', 'srid', 'extent') |
| 3891 | }}} |
| 3892 | |
| 3893 | 2. !AddRasterConstraints ( |
| 3894 | rasttable name,[[BR]] |
| 3895 | rastcolumn name,[[BR]] |
| 3896 | VARIADIC constraints text[] |
| 3897 | ) |
| 3898 | |
| 3899 | 3. !AddRasterConstraints ( |
| 3900 | rastschema name,[[BR]] |
| 3901 | rasttable name,[[BR]] |
| 3902 | rastcolumn name,[[BR]] |
| 3903 | srid boolean DEFAULT TRUE,[[BR]] |
| 3904 | scale_x boolean DEFAULT TRUE,[[BR]] |
| 3905 | scale_y boolean DEFAULT TRUE,[[BR]] |
| 3906 | blocksize_x boolean DEFAULT TRUE,[[BR]] |
| 3907 | blocksize_y boolean DEFAULT TRUE,[[BR]] |
| 3908 | same_alignment boolean DEFAULT TRUE,[[BR]] |
| 3909 | regular_blocking boolean DEFAULT FALSE,[[BR]] |
| 3910 | num_bands boolean DEFAULT TRUE,[[BR]] |
| 3911 | pixel_types boolean DEFAULT TRUE,[[BR]] |
| 3912 | nodata_values boolean DEFAULT TRUE,[[BR]] |
| 3913 | extent boolean DEFAULT TRUE |
| 3914 | ) |
| 3915 | |
| 3916 | 4. !AddRasterConstraints ( |
| 3917 | rasttable name,[[BR]] |
| 3918 | rastcolumn name,[[BR]] |
| 3919 | srid boolean DEFAULT TRUE,[[BR]] |
| 3920 | scale_x boolean DEFAULT TRUE,[[BR]] |
| 3921 | scale_y boolean DEFAULT TRUE,[[BR]] |
| 3922 | blocksize_x boolean DEFAULT TRUE,[[BR]] |
| 3923 | blocksize_y boolean DEFAULT TRUE,[[BR]] |
| 3924 | same_alignment boolean DEFAULT TRUE,[[BR]] |
| 3925 | regular_blocking boolean DEFAULT FALSE,[[BR]] |
| 3926 | num_bands boolean DEFAULT TRUE,[[BR]] |
| 3927 | pixel_types boolean DEFAULT TRUE,[[BR]] |
| 3928 | nodata_values boolean DEFAULT TRUE,[[BR]] |
| 3929 | extent boolean DEFAULT TRUE |
| 3930 | ) |
| 3931 | |
| 3932 | Though users can manually remove raster constraints, it is easier to use one of the !DropRasterConstraints functions |
| 3933 | |
| 3934 | 1. !DropRasterConstraints ( |
| 3935 | rastschema name,[[BR]] |
| 3936 | rasttable name,[[BR]] |
| 3937 | rastcolumn name,[[BR]] |
| 3938 | VARIADIC constraints text[] |
| 3939 | ) |
| 3940 | |
| 3941 | constraints: the same keywords as function !#1 for !AddRasterConstraints |
| 3942 | |
| 3943 | 2. !DropRasterConstraints ( |
| 3944 | rasttable name,[[BR]] |
| 3945 | rastcolumn name,[[BR]] |
| 3946 | VARIADIC constraints text[] |
| 3947 | ) |
| 3948 | |
| 3949 | 3. !DropRasterConstraints ( |
| 3950 | rastschema name,[[BR]] |
| 3951 | rasttable name,[[BR]] |
| 3952 | rastcolumn name,[[BR]] |
| 3953 | srid boolean DEFAULT TRUE,[[BR]] |
| 3954 | scale_x boolean DEFAULT TRUE,[[BR]] |
| 3955 | scale_y boolean DEFAULT TRUE,[[BR]] |
| 3956 | blocksize_x boolean DEFAULT TRUE,[[BR]] |
| 3957 | blocksize_y boolean DEFAULT TRUE,[[BR]] |
| 3958 | same_alignment boolean DEFAULT TRUE,[[BR]] |
| 3959 | regular_blocking boolean DEFAULT TRUE,[[BR]] |
| 3960 | num_bands boolean DEFAULT TRUE,[[BR]] |
| 3961 | pixel_types boolean DEFAULT TRUE,[[BR]] |
| 3962 | nodata_values boolean DEFAULT TRUE,[[BR]] |
| 3963 | extent boolean DEFAULT TRUE |
| 3964 | ) |
| 3965 | |
| 3966 | 4. !DropRasterConstraints ( |
| 3967 | rasttable name,[[BR]] |
| 3968 | rastcolumn name,[[BR]] |
| 3969 | srid boolean DEFAULT TRUE,[[BR]] |
| 3970 | scale_x boolean DEFAULT TRUE,[[BR]] |
| 3971 | scale_y boolean DEFAULT TRUE,[[BR]] |
| 3972 | blocksize_x boolean DEFAULT TRUE,[[BR]] |
| 3973 | blocksize_y boolean DEFAULT TRUE,[[BR]] |
| 3974 | same_alignment boolean DEFAULT TRUE,[[BR]] |
| 3975 | regular_blocking boolean DEFAULT TRUE,[[BR]] |
| 3976 | num_bands boolean DEFAULT TRUE,[[BR]] |
| 3977 | pixel_types boolean DEFAULT TRUE,[[BR]] |
| 3978 | nodata_values boolean DEFAULT TRUE,[[BR]] |
| 3979 | extent boolean DEFAULT TRUE |
| 3980 | ) |
| 3981 | |
| 3982 | |
| 3983 | |
3926 | | '''One column has been removed from the raster_overviews views: out_db.''' |
| 4050 | The distinguishing factor that makes a raster be treated as an overview is the ''enforce_overview_<o_raster_column>'' constraint. The constraint can be applied using one of the !AddOverviewConstraints functions. '''The overview constraint checks that the reference raster column and table exists. If the reference raster column does not exist, the constraint is violated.''' |
| 4051 | |
| 4052 | 1. !AddOverviewConstraints ( |
| 4053 | ovschema name, ovtable name, ovcolumn name,[[BR]] |
| 4054 | refschema name, reftable name, refcolumn name,[[BR]] |
| 4055 | ovfactor int |
| 4056 | ) |
| 4057 | |
| 4058 | 2. !AddOverviewConstraints ( |
| 4059 | ovtable name, ovcolumn name,[[BR]] |
| 4060 | reftable name, refcolumn name,[[BR]] |
| 4061 | ovfactor int |
| 4062 | ) |
| 4063 | |
| 4064 | To drop an overview constraint, use !DropOverviewConstraints. |
| 4065 | |
| 4066 | 1. !DropOverviewConstraints ( |
| 4067 | ovschema name,[[BR]] |
| 4068 | ovtable name,[[BR]] |
| 4069 | ovcolumn name |
| 4070 | ) |
| 4071 | |
| 4072 | 2. !DropOverviewConstraints ( |
| 4073 | ovtable name,[[BR]] |
| 4074 | ovcolumn name |
| 4075 | ) |
| 4076 | |