Sent from Samsung Mobile Hi, The problem I have is similar to this one from an old thread on this list: https://www.mail-archive.com/postgis-users@lists.osgeo.org/msg00013.html I have never succeeded to load a raster into PostGIS on my machine. In the past, I have experienced the same type of error as the one presented in that old thread above when trying to load rasters, mainly TIF files. Today, I tried once again, thinking that my new version of PostGIS (2.1.1) would solve the problem but no luck... When I run this command: E:\data\>raster2pgsql -s 4326 -d -M -I -C -R -F -t 50x50 MOD15A2.A2000049.h12v04.005.2 006268184934_Lai_1km.tif modis.temp | psql -d mortalite -U postgres I get this: ... ... <several lines of INSERT 0 1> INSERT 0 1 INSERT 0 1 INSERT 0 1 INSERT 0 1 INSERT 0 1 INSERT 0 1 CREATE INDEX ANALYZE ERREUR: erreur de syntaxe à la fin de l'entrée LINE 1: SELECT AddRasterConstraints('modis','temp' If I redirect the output of raster2pgsql to an SQL file, I can see that the last line of the file is incomplete, which causes the error: ... INSERT INTO "modis"."temp" ("rast","filename") VALUES ('0100000100F69DBA4D1311813FF69DBA4D131181BF67341363EC7752C06392AE819989474000000000000000000000000000000000E610000032002A008700000000004D4F44313541322E41323030303034392E6831327630342E3030352E323030363236383138343933345F4C61695F316B6D2E74696600'::raster,'MOD15A2.A2000049.h12v04.005.2006268184934_Lai_1km.tif'); INSERT INTO "modis"."temp" ("rast","filename") VALUES ('0100000100F69DBA4D1311813FF69DBA4D131181BFD0C0E9B4415D52C06392AE819989474000000000000000000000000000000000E610000032002A008700000000004D4F44313541322E41323030303034392E6831327630342E3030352E323030363236383138343933345F4C61695F316B6D2E74696600'::raster,'MOD15A2.A2000049.h12v04.005.2006268184934_Lai_1km.tif'); INSERT INTO "modis"."temp" ("rast","filename") VALUES ('0100000100F69DBA4D1311813FF69DBA4D131181BFA3D99658EC2752C06392AE819989474000000000000000000000000000000000E610000019002A008700000000004D4F44313541322E41323030303034392E6831327630342E3030352E323030363236383138343933345F4C61695F316B6D2E74696600'::raster,'MOD15A2.A2000049.h12v04.005.2006268184934_Lai_1km.tif'); CREATE INDEX "temp_rast_gist" ON "modis"."temp" USING gist (st_convexhull("rast")); ANALYZE "modis"."temp"; SELECT AddRasterConstraints('modis','temp' This is very frustrating as since 2012, we've never been able to use any raster in PostGIS :( Has anyone ever experienced similar problems? Thanks for helping, Guillaume
_______________________________________________ postgis-users mailing list postgis-users@lists.osgeo.org http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users