[postgis-users] problem with shp2pgsql

Marie-Lise VAUTIER vautier at ensg.ign.fr
Thu Jul 15 21:31:44 PDT 2004


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.





More information about the postgis-users mailing list