I am importing thousands of .asc files into PostGIS into this table:
CREATE TABLE stg.COUNTRY_1M(rid serial primary key, rast raster);
CREATE INDEX ON stg.COUNTRY_1M USING gist (st_convexhull(rast));
from command line:
export PGPASSWORD=mypasswd
for i in $(ls *.asc); do raster2pgsql -a -C -I -s 27700 -t 1000x1000 "$i" stg.COUNTRY_1M | psql -U user1 -d data_processing -h localhost -q; done
but I am getting the following error starting from the second file:
Processing 1/1: country_1m.asc
ERROR: new row for relation "country_1m" violates check constraint "enforce_max_extent_rast"
DETAIL: Failing row contains (2, 0100000100000000000000F03F000000000000F0BF0000000080841E41000000...).
etc.
How can I generate one table for all the raster points without errors?
-I
it will keep on add indexes. So I will just create a final index at the end.