<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body ><div><br></div><div><br></div><div><br></div><div><div style="font-size:9px;color:#575757">Sent from Samsung Mobile</div></div><br><br><div style="text-align: left; color: rgb(0, 0, 0); "><div style="font-size: 100%; "><span class="Apple-style-span" style="font-size: medium; ">Hi,</span></div></div><br>The problem I have is similar to this one from an old thread on this list:<br><br>https://www.mail-archive.com/postgis-users@lists.osgeo.org/msg00013.html<br><br>I have never succeeded to load a raster into PostGIS on my machine. In<br>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. <div><br></div><div>Today, I tried once again, thinking that my new version of PostGIS (2.1.1) would solve the problem but no luck...<br><br>When I run this command:<br><br>E:\data\>raster2pgsql -s 4326 -d -M -I -C -R -F -t 50x50<br>MOD15A2.A2000049.h12v04.005.2<br>006268184934_Lai_1km.tif modis.temp | psql -d mortalite -U postgres<br><br>I get this:<br>...<br>...<br><several lines of INSERT 0 1><br>INSERT 0 1<br>INSERT 0 1<br>INSERT 0 1<br>INSERT 0 1<br>INSERT 0 1<br>INSERT 0 1<br>CREATE INDEX<br>ANALYZE<br>ERREUR: erreur de syntaxe à la fin de l'entrée<br>LINE 1: SELECT AddRasterConstraints('modis','temp'<br><br>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:<br><br>...<br>INSERT INTO "modis"."temp" ("rast","filename") VALUES<br>('0100000100F69DBA4D1311813FF69DBA4D131181BF67341363EC7752C06392AE819989474000000000000000000000000000000000E610000032002A008700000000004D4F44313541322E41323030303034392E6831327630342E3030352E323030363236383138343933345F4C61695F316B6D2E74696600'::raster,'MOD15A2.A2000049.h12v04.005.2006268184934_Lai_1km.tif');<br>INSERT INTO "modis"."temp" ("rast","filename") VALUES<br>('0100000100F69DBA4D1311813FF69DBA4D131181BFD0C0E9B4415D52C06392AE819989474000000000000000000000000000000000E610000032002A008700000000004D4F44313541322E41323030303034392E6831327630342E3030352E323030363236383138343933345F4C61695F316B6D2E74696600'::raster,'MOD15A2.A2000049.h12v04.005.2006268184934_Lai_1km.tif');<br>INSERT INTO "modis"."temp" ("rast","filename") VALUES<br>('0100000100F69DBA4D1311813FF69DBA4D131181BFA3D99658EC2752C06392AE819989474000000000000000000000000000000000E610000019002A008700000000004D4F44313541322E41323030303034392E6831327630342E3030352E323030363236383138343933345F4C61695F316B6D2E74696600'::raster,'MOD15A2.A2000049.h12v04.005.2006268184934_Lai_1km.tif');<br>CREATE INDEX "temp_rast_gist" ON "modis"."temp" USING gist<br>(st_convexhull("rast"));<br>ANALYZE "modis"."temp";<br>SELECT AddRasterConstraints('modis','temp'<br><br>This is very frustrating as since 2012, we've never been able to use any<br>raster in PostGIS :(<br><br>Has anyone ever experienced similar problems?<br><br>Thanks for helping,<br><br>Guillaume<br><br></div></body>