Regina, When I do
SELECT postgis_full_version(); It says (from what I remember. I won't have access to my database until next week) : GDAL 1.11dev (of course if my 1.11dev installation is at the place described by the GDAL variable). If my GDAL installation is moved as I did in my previous post, the GDAL version shown by SELECT postgis_full_version(); is 1.10. So it looks like a problem with raster2pgsql and rather than with PostGIS as the loading of the SQL file from raster2pgsql runs fine. I don't know who maintains this program but maybe it'd be worth checking it against versions of GDAL after 1.10. Regards, Guillaume > > Message: 2 > Date: Wed, 30 Apr 2014 21:24:06 -0400 > From: "Paragon Corporation" <[email protected]> > To: "'PostGIS Users Discussion'" <[email protected]> > Subject: Re: [postgis-users] Subject: Re: raster2pgsql 2.1.1 on > Windows 7 64bit - ERREUR: erreur de syntaxe > Message-ID: <B32609B07B7A4065BCB2823C48B3F6C5@O> > Content-Type: text/plain; charset="us-ascii" > > Guillaume, > > It was my understanding that PostGIS only uses the libgdal in the same > folder as raster2pgsql since that would be the first in its path. However it > uses the environment variable for the proj files and so forth. So I'm still > a bit surprised this is an issue unless those files are vastly different > from 1.10. > > When you do > > SELECT postgis_full_version(); > > What does it give for the GDAL version. > > > If its just a during load problem, I think you can just simply override the > environment variable in your loader batch script > > SET GDAL_DATA="C:\Program Files\PostgreSQL\9.3\gdal-data" > > Of course this won't fix your running install. In PostGIS 2.2 we introduced > a PostgreSQL GUC variable to handle this: > > http://postgis.net/docs/manual-dev/postgis_gdal_datapath.html > > But unfortunately that won't help you for 2.1 and not sure how much that > helps with raster2pgsql anyway since I don't think raster2pgsql makes > connection to Postgres to be able to even see that variable. > > What I could do is create a build that uses the newer GDAL to see if that > improves your situation (you can be my test guinea pig :) ). IN 2.2 I plan > to ship with GDAL 1.11 and probably upgrade next 2.1 to GDAL 1.11 as well > since unfortunately they have to share the same GDAL on same PostgreSQL > install and some people I expect will be running both. > > > Opinions? > Regina > http://www.postgis.us > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Guillaume Drolet > Sent: Wednesday, April 30, 2014 4:39 PM > To: [email protected] > Subject: [postgis-users] Subject: Re: raster2pgsql 2.1.1 on Windows 7 64bit > - ERREUR: erreur de syntaxe > > Hi Regina and others: > > We found the problem with raster2pgsql! It was my version of GDAL > (1.11dev) that my GDAL environment variable was pointing to that created the > bug. I simply moved my GDAL folder to some other location (without changing > GDAL environment variable) and ran raster2pgsql again so that PostGIS could > use its own GDAL instead. This resulted in a complete (i.e. no broken line > at the end) output SQL file from raster2pgsql. > > Since I want to keep using my GDAL version (1.11dev, with all my add-ons > compiled and the version used by other software), this raises the question: > how to force PostGIS to not use the GDAL installation referenced by the GDAL > environment variable but instead use its own GDAL? > > Thanks! > > G > > 2014-04-30 15:00 GMT-04:00 <[email protected]>: >> Send postgis-users mailing list submissions to >> [email protected] >> >> To subscribe or unsubscribe via the World Wide Web, visit >> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users >> or, via email, send a message with subject or body 'help' to >> [email protected] >> >> You can reach the person managing the list at >> [email protected] >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of postgis-users digest..." >> >> >> Today's Topics: >> >> 1. Re: Subject: Re: raster2pgsql 2.1.1 on Windows 7 64bit - >> ERREUR: erreur de syntaxe (Paragon Corporation) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Tue, 29 Apr 2014 18:51:16 -0400 >> From: "Paragon Corporation" <[email protected]> >> To: "'PostGIS Users Discussion'" <[email protected]> >> Subject: Re: [postgis-users] Subject: Re: raster2pgsql 2.1.1 on >> Windows 7 64bit - ERREUR: erreur de syntaxe >> Message-ID: <40C3ECB89B9F4C388A6CE0F390D877C5@O> >> Content-Type: text/plain; charset="us-ascii" >> >> Guillaume, >> >> Did you say this works fine on your home pc, but not your work one? >> >> I'm wondering if maybe its some malware or virus checker shutting down >> the execution of raster2pgsql for some reason. >> >> Have you looked at the windows event viewer to see if it is showing >> any messages? I recall one time a behind the scenes VMWare virus >> checker kept on deleting some of my Msys files because it thought it >> was hacker ware. No duh. Had to tell sysadmins to exclude the folder from > their checking. >> >> Hope that helps, >> Regina >> >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf Of Guillaume >> Drolet >> Sent: Monday, April 28, 2014 2:30 PM >> To: [email protected] >> Subject: [postgis-users] Subject: Re: raster2pgsql 2.1.1 on Windows 7 >> 64bit >> - ERREUR: erreur de syntaxe >> >> Hi Mateusz, >> >> Thanks for helping. What you suggested, i.e. outputting raster2pgsql >> to an SQL file instead of piping it to psql, I have done already. I >> also posted examples of where the lines are broken in previous post >> (see also Jean-Daniel Sylvain's older post on the same topic). >> >> It doesn't seem to break on non-ASCII characters. For example, this >> one breaks in the middle of the file name at line 168: >> >> ... >> INSERT INTO "mod09a1.a2000049.h12v04.005.2006268184041_sur_refl_b01" >> ("rast","filename") VALUES >> ('0100000100A544B7031A11713FA544B7031A1171BF86BE196C857752C095AFEE8CEE >> 6E4740 >> 00000000000000000000000000000000E610000032001F008700000000004D4F443039 >> 41312E >> 41323030303034392E6831327630342E3030352E323030363236383138343034315F73 >> 75725F >> 7265666C5F6230312E74696600'::raster,'MOD09A1.A2000049.h12v04.005.20062 >> 681840 >> 41_sur_refl_b01.tif'); >> INSERT INTO "mod09a1.a2000049.h12v04.005.2006268184041_sur_refl_b01" >> ("rast","filename") VALUES >> ('0100000100A544B7031A11713FA544B7031A1171BF59D7C60F306A52C095AFEE8CEE >> 6E4740 >> 00000000000000000000000000000000E610000032001F008700000000004D4F443039 >> 41312E >> 41323030303034392E6831327630342E3030352E323030363236383138343034315F73 >> 75725F >> 7265666C5F6230312E74696600'::raster,'MOD09A1.A2000049.h12v04.005.20062 >> 681840 >> 41_sur_refl_b01.tif'); >> INSERT INTO "mod09a1.a2000049.h12v04.005.2006268184041_sur_refl_b01" >> ("rast","filename") VALUES >> ('0100000100A544B7031A11713FA544B7031A1171BF2BF073B3DA5C52C095AFEE8CEE >> 6E4740 >> 00000000000000000000000000000000E610000032001F008700000000004D4F443039 >> 41312E >> 41323030303034392E6831327630342E3030352E323030363236383138343034315F73 >> 75725F >> 7265666C5F6230312E74696600'::raster,'MOD09A1.A2000049.h12v04.005.20062 >> 681840 >> 41_sur_refl_b01.tif'); >> INSERT INTO "mod09a1.a2000049.h12v04.005.20062 >> >> Or, this one (same tif file; I only shortened the filename) breaks in >> the middle of a cell (or tile?) representation, still at line 168: >> >> ... >> INTO "mod09a1.a2000049.sur_refl_b01" ("rast","filename") VALUES >> ('0100000100A544B7031A11713FA544B7031A1171BF86BE196C857752C095AFEE8CEE >> 6E4740 >> 00000000000000000000000000000000E610000032001F008700000000004D4F443039 >> 41312E >> 41323030303034392E7375725F7265666C5F6230312E74696600'::raster,'MOD09A1 >> .A2000 >> 049.sur_refl_b01.tif'); >> INSERT INTO "mod09a1.a2000049.sur_refl_b01" ("rast","filename") VALUES >> ('0100000100A544B7031A11713FA544B7031A1171BF59D7C60F306A52C095AFEE8CEE >> 6E4740 >> 00000000000000000000000000000000E610000032001F008700000000004D4F443039 >> 41312E >> 41323030303034392E7375725F7265666C5F6230312E74696600'::raster,'MOD09A1 >> .A2000 >> 049.sur_refl_b01.tif'); >> INSERT INTO "mod09a1.a2000049.sur_refl_b01" ("rast","filename") VALUES >> ('0100000100A544B7031A11713FA544B7031A1171BF2BF073B3DA5C52C095AFEE8CEE >> 6E4740 >> 00000000000000000000000000000000E610000032001F008700000000004D4F443039 >> 41312E >> 41323030303034392E7375725F7265666C5F6230312E74696600'::raster,'MOD09A1 >> .A2000 >> 049.sur_refl_b01.tif'); >> INSERT INTO "mod09a1.a2000049.sur_refl_b01" ("rast","filename") VALUES >> ('0100000100A544B7031A11713FA544B7031A117 >> >> This is VERY frustrating and I hope an answer will be found! >> >> Guillaume >> >> >> Message: 2 >> Date: Thu, 24 Apr 2014 21:43:43 +0200 >> From: Mateusz ?oskot <[email protected]> >> To: PostGIS Users Discussion <[email protected] >>> >> Subject: Re: [postgis-users] Subject: Re: raster2pgsql 2.1.1 on >> Windows 7 64bit - ERREUR: erreur de syntaxe >> Message-ID: >> >> <cabueae-w_cxrph_jp3ohbkkaqe9smi+0bg1zdapocenpxmq...@mail.gmail.com> >> Content-Type: text/plain; charset=UTF-8 >> >> On 24 April 2014 21:19, Guillaume Drolet <[email protected]> > wrote: >>> I tried the same command as in my previous post on my PC at home. >>> It's Windows 7 64bit as well and the cluster has the same locale >>> ('French.Canadian.1252'.) and encoding (UTF8). >>> >>> The command was successful so my work colleague and I, who >>> experiences the same behaviour as the one described previously on >>> this list, suspect that it may be due to some problems or conflict >>> between PostGIS and the hardware (we have similar systems): is this a >>> sensible hypothesis? >> >> I doubt it. I use raster2pgsql frequently on Windows, since PostGIS >> pre-2.0 and I have never experienced any such issues. >> >> raster2pgsql is a standalone command line utility that generates SQL >> commands and outputs them to stdout. >> raster2pgsql has no run-time dependency on PostgreSQL or PostGIS. >> >> First thing to check is: does raster2pgsql generate valid output, if >> redirected to file, does the SQL commands in output file look >> well-formed and complete? >> >> If not, which SQL lines are broken? >> Do the broken lines correspond to any character data in non-ASCII > encodings? >> For example, check if you run raster2pgsql with -F switch to add >> column with the name of your raster file and the raster file name >> contains characters with French accents, etc. >> >> I'd suggest, don't use psql.exe or load any data to PostgreSQL until >> you confirm raster2pgsql generates text output with complete >> well-formed and valid SQL commands first. >> >> Best regards, >> -- >> Mateusz ?oskot, http://mateusz.loskot.net >> _______________________________________________ >> postgis-users mailing list >> [email protected] >> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users >> >> >> >> >> ------------------------------ >> >> _______________________________________________ >> postgis-users mailing list >> [email protected] >> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users >> >> End of postgis-users Digest, Vol 146, Issue 28 >> ********************************************** > _______________________________________________ > postgis-users mailing list > [email protected] > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users > > > > > ------------------------------ > > _______________________________________________ > postgis-users mailing list > [email protected] > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users > > End of postgis-users Digest, Vol 147, Issue 1 > ********************************************* _______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
