[postgis-users] problem with shp2pgsql
Bo Overgaard
boo at CARLBRO.DK
Fri Jul 16 01:51:51 PDT 2004
Hi Marie-Lise
You don't have to create the table in postgresql, shp2pgsql will do the work
for you.
In a shell you only need to run:
[username @localhost username]$ ./shp2pgsql -s 32632 -c ./i5605r_p rail mydb
| ./psql mydb -U username
Regards
Bo Overgaard
-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of
Marie-Lise VAUTIER
Sent: 16. juli 2004 05:32
To: PostGIS Users Discussion
Subject: [postgis-users] problem with shp2pgsql
Hello,
I'm trying to use shp2pgsql to convert a shapefile and then load it to my
db.
So, I first create a table in my database:
mydb=# CREATE TABLE rail();
CREATE TABLE
mydb=# SELECT AddGeometryColumn('my_db', 'rail', 'rail_geom', -1,
'GEOMETRY', 2);
NOTICE: Invalid schema name - using current_schema()
CONTEXT: PL/pgSQL function "addgeometrycolumn" line 4 at select into
variables
NOTICE: Invalid schema name - using current_schema()
CONTEXT: PL/pgSQL function "addgeometrycolumn" line 4 at select into
variables
addgeometrycolumn
----------------------------------------------------------------------------
--------------
Geometry column rail_geom added to table public.rail WITH a SRID of -1 and
type
GEOMETRY
(1 row)
and then I run
[postgres at localhost postgres]$ shp2pgsql i5605r_p mydb > rail.sql
and I get:
shape is null
I have also tried this command with the absolute path of the shapefiles, but
I
have the same answer.
So my questions are:
-do I have to take into account the warning messages?
-where must I put the shapefiles to run shp2pgsql?
Thank you a lot, Marie-Lise.
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list