I have a problem when loading multiple raster files into a Postgis database. When I run this command in the cl
raster2pgsql -I -C -e -Y -F -s 4326 -t 100x100 *.tif public.newTable | psql -d db
the following warnings are returned:
NOTICE: The rasters (pixel corner coordinates) are not aligned NOTICE: Unable to add constraint: enforce_same_alignment_rast
The rasters seem not to have exactly the same alignment. When looking at the corner coordinates, I see that they differ. Two corners that should collapse have the following coordinates (WGS):
Lower Left ( 0.0000000, 9.9996668) ( 0d 0' 0.01"E, 9d59'58.80"N) Upper Left ( 0.0000000, 10.0000001) ( 0d 0' 0.01"E, 10d 0' 0.00"N)
I also tried to load the files to R using the raster package, but it didn't work either. However when loading the rasters directly into QGIS there is no problem.
Does anybody know how to resolve this issue? And why does it work in QGIS, but not in R and PostGIS?