[postgis-users] shp2pgsql loader
strk
strk at keybit.net
Tue Apr 13 07:11:38 PDT 2004
On Tue, Apr 13, 2004 at 02:02:51PM +0000, Saurabh Data wrote:
> Dear users
>
> As it says in the documentation about the shp2pgsql loader :
>
> a) shp2pgsql shaperoads roadstable roadsdb > roads.sql
> b) psql -d roadsdb -f roads.sql
>
> Can someone clarify what exactly is happening in a) and b)
>
> I understand that the a) is for conversion and b) is for uploading the file
> to psql
You correctly understood.
>
> What I understand is that the command shp2pgsql in a) converts a shapfile
> called "shaperoads" into roads.sql ..but what does roadstable and roadsdb
> signify ?
The roads.sql file will contain sql code needed to fill a table
with values extracted from the shapefile. 'roadstable' is name
of the table you want to insert/append values to. 'roadsdb' is
an obsoleted argument that was needed for postgis versions prior
to 0.8 to add metadata informations in a postgis-enabled database.
You should omit that argument for postgis installations >= 0.8.
>
> Am I right in assuming that in b) , it just tries to connect to the psql
> database name roadsdb and places the file roads.sql there ?
Yes. You are right.
--strk;
>
> Thanks for any help
>
> Saurabh Data
More information about the postgis-users
mailing list