[postgis-users] RE Importing shapefiles to PostGIS

P Kishor punk.kish at gmail.com
Thu Jan 28 21:45:54 PST 2010


On Thu, Jan 28, 2010 at 11:30 PM, Ben Madin
<lists at remoteinformation.com.au> wrote:
> You can also read in SQL commands into psql using the \i command, for instance :
>
> testdb=# \i ~/Shapefiles/06001_Alameda_County/tl_2008_06001_arealm/tl_2008_06001_arealm.sql
>
> should read it in...
>

very cool. I did not know this. Given this is so simple, any reason
why I wouldn't/shouldn't use this? I am assuming it loads the data
into 'testdb' using the current user that is logged into the command
line, no?


> At least this should get you around the authentication issues...
>
> cheers
>
> Ben
>
>
> On 29/01/2010, at 12:06 , Shreerang Patwardhan wrote:
>
>> Hi all,
>>     I am still stuck at this "Ident authentification error"...<323.png> The sequence of commands that I used and their outputs are as below:
>>
>> shreerang at ubuntu:~/Shapefiles/06001_Alameda_County/tl_2008_06001_arealm$ shp2pgsql -s 4326 -I -S tl_2008_06001_arealm.shp public.testdb > 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 testdb -h localhost -p 5432 -U postgres
>> Welcome to psql 8.3.9 (server 8.4.2), the PostgreSQL interactive terminal.
>>
>> testdb=# psql -d testdb -U postgres -f tl_2008_06001_arealm.sql
>>
>> What should be the output of this command at the terminal? On entering this command the terminal gives a new promt. Is this the desired output?
>>
>> When I use the command  testdb-# \d  I get the output as:
>>
>>               List of relations
>>  Schema |       Name       | Type  |  Owner
>> --------+------------------+-------+----------
>>  public | geometry_columns | table | postgres
>>  public | spatial_ref_sys  | table | postgres
>> (2 rows)
>>
>> Please help guys!!!
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================
Sent from Madison, Wisconsin, United States



More information about the postgis-users mailing list