[postgis-users] Using raster2pgsql on a system with no postgresqlinstall

Darrel Maddy darrel.maddy at newcastle.ac.uk
Sun Jan 8 12:06:57 PST 2012


Dear Regina,

Many thanks for this - I did not look at the tutorial as it relates to 1.5 and I am using 2 (silly me). However, thankfully you did point me in the right direction, although your enhanced list was a little short. I started to systematically look at which files are needed by raster2pgsql and determined the following list is needed on the client machine (n.b. this also includes the necessary files to connect to a PG db). Here is the directory listing from my 'working' (remote system) directory.

02/12/2011  02:07           419,328 psql.exe
21/12/2011  10:23           771,642 raster2pgsql.exe
21/12/2011  10:23           212,992 ssleay32.dll
02/12/2011  02:07           180,736 pg_restore.exe
02/12/2011  02:07           373,248 pg_dump.exe
21/12/2011  10:23           794,226 shp2pgsql.exe
21/12/2011  10:23            12,288 comerr32.dll
21/12/2011  10:23           634,880 krb5_32.dll
21/12/2011  10:23            83,906 libintl-8.dll
02/12/2011  02:07           167,936 libpq.dll
21/12/2011  10:23         1,032,192 libeay32.dll
21/12/2011  10:23         9,622,528 libgdal-1.dll
21/12/2011  10:23           926,208 libiconv-2.dll
21/12/2011  10:23           451,584 libgeos_c-1.dll
21/12/2011  10:23         1,789,952 libgeos-3-3-2dev.dll
21/12/2011  10:23           100,352 zlib1.dll

My batch file is not working as intended at present but I will resolve that later - the executables seem to all work fine on their own, so I think this is a complete list (but I guess only real use will tell).

Best wishes and many thanks again for your help.

Darrel





From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paragon Corporation
Sent: 08 January 2012 01:25
To: 'PostGIS Users Discussion'
Subject: Re: [postgis-users] Using raster2pgsql on a system with no postgresqlinstall

Darrel,

This should work fine.  I haven't tried it, but can't see why it would be any different from shp2pgsql.  It should be pretty much the same story as shp2pgsql except you'll need to copy the libgdal-1.dll as well to the folder.

I'm not sure if you have tried it before --- but here is a list of files as I recall you need for all the postgis executables to work.  I'll update for 1.5.

Way at the bottom of this tutorial we have listed the files you need to copy to the folder:

http://www.bostongis.com/PrinterFriendly.aspx?content_name=postgis_tut01

So add to that list libgdal-1.dll, raster2pgsql.exe

Hope that helps,
Regina
http://www.postgis.us


________________________________
From: postgis-users-bounces at postgis.refractions.net<mailto:postgis-users-bounces at postgis.refractions.net> [mailto:postgis-users-bounces at postgis.refractions.net]<mailto:[mailto:postgis-users-bounces at postgis.refractions.net]> On Behalf Of Darrel Maddy
Sent: Saturday, January 07, 2012 6:36 PM
To: postgis-users at postgis.refractions.net<mailto:postgis-users at postgis.refractions.net>
Subject: [postgis-users] Using raster2pgsql on a system with no postgresqlinstall
Dear all,

I may be asking to do the impossible here but here goes.

We are about to deploy a landscape evolution model across a condor system (comprising ~1000 computers) in order to undertake sensitivity analysis. The output data will comprise hundreds of thousands of GTiff files (each with about 0.5M cells at this stage). My idea was to get the individual 'clients' (which run windows) to write output files directly into the db on our linux-based server. Now I just tried a quick check using a batch file that takes *.tif, uses raster2pgsql to create the sql file and issue the psql command to write the files into a database table.  This works (of course) on my home windows-based server but each of the clients in the condor system will not have postgres installed. I created a directory on a windows laptop which does not have a PG install and included the executables I thought necessary and an appropriate batch file but, I guess not surprisingly, it did not work.  Is there a way to do this without requiring additional software to be installed on the clients? or will I need to just upload files to a server directory and then run the command in batch mode directly on the server?  I guess I am just looking to let the condor machines do more of the work.

Alternatively is the source code for raster2psql available for direct integration into the model code? (sorry I am using the windows version to test postgis2). I guess I could also be missing an equally obvious alternative?

Hope that makes sense.

Darrel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120108/69b0acd7/attachment.html>


More information about the postgis-users mailing list