[postgis-users] RE: Problwm with shp2pgsql.exe
Chris Hodgson
chodgson at refractions.net
Fri Oct 11 09:19:14 PDT 2002
shp2pgsql doesn't connect to the database - it just outputs the sql.
If you don't want to actually create the sql file, you can always just pipe the sql output into psql, like this:
shp2pgsql -c pm.shp pm Geoprocessing | psql -d Geoprocessing
Chris
----- Original Message -----
From: YC Nyon
To: postgis-users at postgis.refractions.net
Sent: Thursday, October 10, 2002 7:04 AM
Subject: [postgis-users] RE: Problwm with shp2pgsql.exe
When I issue this command:
C:\postgresql\bin>shp2pgsql -c pm.shp pm Geoprocessing
The output is as follows:
---------------------------------------------------------
create table pm (gid int4 , ID int4);
select AddGeometryColumn('Geoprocessing','pm','the_geom','-1','MULTIPOLYGON',2);
begin;
Insert into pm values('0','0',GeometryFromText('MULTIPOLYGON(((0.194 0.128 ,0.19
4 0.74 ,0.846 0.74 ,0.846 0.128 ,0.194 0.128 )))',-1) );end;
However, when i check, there is no inserts or table structure to the Geoprocessing database.
Then, I tried to generate the sql statements first:
C:\postgresql\bin>shp2pgsql -c pm.shp pm Geoprocessing > test.sql
and
C:\postgresql\bin>psql -f test.sql -d Geoprocessing
A check shows the table is present. Connection to Arcview via extensions and pgsql2shape dump works fine.
Did I miss some parameters while issueing the shp2pgsql.exe command?
FYI, I am using the native port of Postgresql 7.2.1
Regards
Nyon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20021011/6d4f3a86/attachment.html>
More information about the postgis-users
mailing list