继我之前的相关问题之后,让我详细说明一下这个话题。
raster2pgsql
是一个光栅加载器可执行文件,它在 PostGIS 中加载 GDAL 支持的光栅格式。它有一个-C
定义如下的标志:
gislinux@gislinux-Precision-M4600:~$ raster2pgsql
输出:
-C Set the standard set of constraints on the raster
column after the rasters are loaded. Some constraints may fail
if one or more rasters violate the constraint.
Run Code Online (Sandbox Code Playgroud)
当我像这样导入我的光栅文件时:
gislinux@gislinux-Precision-M4600:~$ raster2pgsql -d -I -C -M -F -t 100x100 -s 4326
us_tmin_2012.01.asc chp05.us_tmin_new | psql -h localhost -p 5432 -U postgres -d pgrouting
Run Code Online (Sandbox Code Playgroud)
输出:
ANALYZE
NOTICE: Adding SRID constraint
CONTEXT: PL/pgSQL function addrasterconstraints line 53 at RETURN …
Run Code Online (Sandbox Code Playgroud) 我正在使用以下命令向 PostGIS-2.1.3 (PostgreSQL-9.1.14) 中的光栅图像之一添加约束。
ALTER TABLE schema1.table1 ADD CONSTRAINT enforce_scalex_rast unique (rast);
Run Code Online (Sandbox Code Playgroud)
但得到以下错误:
ERROR: data type raster has no default operator class for access method "btree"
HINT: You must specify an operator class for the index or define a default operator class for the data type.
Run Code Online (Sandbox Code Playgroud)
请有人帮我解决这个错误。我对运算符类没有基本的了解。谢谢。
齐亚。