[postgis-users] raster2pgsql quoted string error

Jean-Daniel Sylvain jean-daniel.sylvain at mrnf.gouv.qc.ca
Thu Nov 1 08:05:43 PDT 2012


Dear PGIS users,

I'm working with the postgis 2.0 :

 1. PostgreSQL 9.1.4, compiled by Visual C++ build 1500, 64-bit"
 2. "POSTGIS="2.0.1 r9979" GEOS="3.3.5-CAPI-1.7.5" PROJ="Rel. 4.8.0, 6
    March 2012" GDAL="GDAL 1.9.1, released 2012/05/15" LIBXML="2.7.8"
    LIBJSON="UNKNOWN" RASTER"

I'm trying to load a raster.tif (DEM) into  my database with the 
following command.

raster2pgsql -f elev -F -t 100x100  QC_SRTM.tif QC_SRTM | psql -U 
postgres -d DEM -h localhost -p 5432

And I catched this error;

INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
INSERT 0 1
psql:elev1.sql:5690: ERREUR:  chaîne entre guillemets non terminée sur 
ou près de « '010000010000000....

..... indicating that the string is not quoted near the last line.

So I ran  the raster2pgsql.exe with this command

D:\Data\Geodata\Altimetrie\SRTM\DEM90m\PreTraitement>raster2pgsql -f 
elev -F -t 100x100  QC_SRTM.tif QC_SRTM > InsertSRTM.sql
Processing 1/1: QC_SRTM.sdat

and looked at the content of the sql file. The last line of the file is 
cut and the command "END;" is not there.

If I correct the file by ending the line and adding the "End;" command 
the file is load.

I was wondering what parameter would be responsible for that error in 
raster2pgsql?

I have many raster to load so this temporary solution is not a TRUE 
solution. Anyone had an idea?

Thanks.

Jean-Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20121101/bcca7d2d/attachment.html>


More information about the postgis-users mailing list