Guillaume, What is the encoding and client encoding of your database? I have run into this issue before if I have a client encoding setting other than UTF8. To work around it I force the client encoding to UTF8 during load. So if your encoding is different try in your batch script add this before you load SET PGCLIENTENCODING=UTF8
Hope that helps, Regina _____ From: [email protected] [mailto:[email protected]] On Behalf Of droletguillaume Sent: Wednesday, April 16, 2014 11:25 PM To: [email protected] Subject: [postgis-users] raster2pgsql 2.1.1 on Windows 7 64bit - ERREUR: erreur de syntaxe 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/[email protected]/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 ('0100000100F69DBA4D1311813FF69DBA4D131181BF67341363EC7752C06392AE8199894740 00000000000000000000000000000000E610000032002A008700000000004D4F44313541322E 41323030303034392E6831327630342E3030352E323030363236383138343933345F4C61695F 316B6D2E74696600'::raster,'MOD15A2.A2000049.h12v04.005.2006268184934_Lai_1km .tif'); INSERT INTO "modis"."temp" ("rast","filename") VALUES ('0100000100F69DBA4D1311813FF69DBA4D131181BFD0C0E9B4415D52C06392AE8199894740 00000000000000000000000000000000E610000032002A008700000000004D4F44313541322E 41323030303034392E6831327630342E3030352E323030363236383138343933345F4C61695F 316B6D2E74696600'::raster,'MOD15A2.A2000049.h12v04.005.2006268184934_Lai_1km .tif'); INSERT INTO "modis"."temp" ("rast","filename") VALUES ('0100000100F69DBA4D1311813FF69DBA4D131181BFA3D99658EC2752C06392AE8199894740 00000000000000000000000000000000E610000019002A008700000000004D4F44313541322E 41323030303034392E6831327630342E3030352E323030363236383138343933345F4C61695F 316B6D2E74696600'::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 [email protected] http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
