[postgis-users] problem with shp2pgsql
strk
strk at keybit.net
Fri Jul 16 01:01:04 PDT 2004
On Fri, Jul 16, 2004 at 06:31:44AM +0200, Marie-Lise VAUTIER wrote:
> 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)
The first argument of AddGeometryColumn is no more the database, but the schema name.
If you don't care about schemas you can also omit it:
SELECT AddGeometryColumn('rail', 'rail_geom', -1, 'GEOMETRY', 2);
>
> and then I run
>
> [postgres at localhost postgres]$ shp2pgsql i5605r_p mydb > rail.sql
>
> and I get:
> shape is null
are you sure i5605r_p.shp does exist in current directory ?
What version of shp2pgsql are you using (recent versions print RCSID when called with no args).
What OS ?
--strk;
>
> 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