2009/9/18 Melanie Hofmann <melanie(dot)hofmann20(at)googlemail(dot)com>:
> I am new in this list.
> Sorry for my worse english.
> I have a problem, and I didn't find a answer in the Internet.
> I will use the command shp2pgsql from a java programm to import shapefiles
> in a postgresql DB, but I can't find some examples.
> Can anybody help me, or have anybody an example how this work? or a
> Thank you for your answer.
I think you basically want to set up a shell pipeline from Java.
You could either execute shp2pgsql from Java and arrange for its
stdout file descriptor to be pointing at a file and then execute psql
to read from that same file, or you could do it in one step by
connecting the stdout of shp2pgsql to the stdin of psql.
From Python, this is one way to do it. (It should work from Jython
too, I think):
From Java you might find something useful here:
Michael Wood <esiotrot(at)gmail(dot)com>
In response to
pgsql-novice by date
|Next:||From: Ron Arts||Date: 2009-09-18 10:06:47|
|Subject: Index not used in join.. (example included)|
|Previous:||From: Michael Wood||Date: 2009-09-18 06:37:23|
|Subject: Re: Problem of creating geometry column (linestring)|