[postgis-users] RE Importing shapefiles to PostGIS

Shreerang Patwardhan patwardhan.shreerang at gmail.com
Sun Jan 24 09:10:03 PST 2010


Hello all,
        I have followed the following steps to import TIGER shapefile to
PostGIS . I  got the following output and errors.

shreerang at ubuntu:~/Shapefiles/
06001_Alameda_County/tl_2008_06001_arealm$ shp2pgsql -s 4326 -I -S
tl_2008_06001_arealm.shp public.test_db > tl_2008_06001_arealm.sql
Shapefile type: Polygon
Postgis type: POLYGON[2]

shreerang at ubuntu:~/Shapefiles/06001_Alameda_County/tl_2008_06001_arealm$
psql -d test_db -U postgres -f import.sql
psql: FATAL:  Ident authentication failed for user "postgres"


Now, I followed the following procedure. I wish to know if it is right or
wrong.

The first command is as it is....
For the next one,

shreerang at ubuntu:~/Shapefiles/06001_Alameda_County/tl_2008_06001_arealm$
sudo su postgres
[sudo] password for shreerang:
$ psql -U postgres
could not change directory to
"/home/shreerang/Shapefiles/06001_Alameda_County/tl_2008_06001_arealm"
Welcome to psql 8.3.9, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

postgres=# psql -d test_db -U postgres -f import.sql

Is this right?
And what should the output look like if this is right?...

Need help!!!


Thanx,
Shreerang.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100124/ae66ad88/attachment.html>


More information about the postgis-users mailing list