[postgis-users] problem with shp2pgsql

henok tadesse bwhenok at yahoo.com
Wed Dec 28 12:07:10 PST 2005


thanks  every body, 
 
 i actually have already loaded all the shape files  in the folder where the shp2pgsql exists.
 
 so i considered the hint to include the myschema thing...
 
     ./shp2pgsql -s 26911  River.shp River myschema.myRiverdb > River.sql
 
 but still it returns >> bash: River.sql: Permission denied
 
 it looks like there is a brain cracking challenge at every step of this code...well atleast
 
 it doesnot say this time that  the shape files cannot be opened!  Any idea why I am not 
 
 allowed to create the river.sql --- i am thankful for the explanation as always! 
 
 henok
 

Barend Köbben <kobben at itc.nl> wrote: Hi Henok,
 
possible solutions:
 
1) you do not include the [schema.]database in the paramters. Not sure if it is required, but it might be, so uit would be:
./shp2pgsql -s 26911  River.shp  River  [mySchema.]myDB> River.sql
 
2) you have only copied the *.shp file to the loader directory, but not the other associated (and needed fiel). These include at least *.dbf and *.shx , in many cases also *.sbn, *.prj or *.sbx
 
keep trying ;-)
____________________________ 
Barend Köbben 
International Institute for Geo-information Sciences and  Earth Observation (ITC) 
PO Box 6, 7500AA Enschede (The Netherlands) 
ph: +31-(0)534874253; fax: +31-(0)534874335 
_____________________________ 

________________________________

From: postgis-users-bounces at postgis.refractions.net on behalf of henok tadesse
Sent: Wed 28.12.2005 14:37
To: PostGIS Users Discussion
Subject: RE: [postgis-users] problem with shp2pgsql


Thanks for the hint... but i now have corrected the path problems but i continue to have problems. i am actually working in linux and the shapefile is in the same folder as the shp2pgsql. 
   
     ./shp2pgsql -s 26911  River.shp  River  > River.sql

or i have also tried this one...

   /shp2pgsql -s 26911  River.shp  River  |  psql myRiverdb.sql

I am using the shapefile and tutorial from carto.net  just to first test if it works but in
both cases, it returns River.shp: shape (.shp) or index files (.shx) can not be opened.

I really do understand this. why it cannot be opened? 

with thanks in advance,


Barend Köbben  wrote: 

 What they mean is: If the shapefile is in the "loader directory" (ie the directory the shp2pgsql executable is in) you only need to specify the shapefiles name, otherwise make sure you state the full path:
 
 eg. for windows: 
 shp2pgsql.exe C:\mydirectory\asubdirectory\myshapefile.shp mytable myDB
 
 ____________________________ 
 Barend Köbben 
 International Institute for Geo-information Sciences and Earth Observation (ITC) 
 PO Box 6, 7500AA Enschede (The Netherlands) 
 ph: +31-(0)534874253; fax: +31-(0)534874335 
 _____________________________ 
 
 ________________________________
 
 From: postgis-users-bounces at postgis.refractions.net on behalf of henok tadesse
 Sent: Tue 27.12.2005 20:15
 To: postgis-users at postgis.refractions.net
 Subject: [postgis-users] problem with shp2pgsql
 
 
 hello,
 
 I was trying to load a shape file into my postgis database. Some body in this forum once said the shapefile should be put in the loader directory. But i could not really find out where the loader directory is although i used this command to load the dumper!
 
 
 
 # cd postgis-1.1.0/loader 
 # make
 # make install
 
 Should the shape file necessarily be in the loader dirctory to be used in shp2pgsql? if yes, where can i find it?
 
 thanks in advance,
 
 henok
 
 
 ________________________________
 
 Yahoo! Photos - NEW, now offering a quality print service from just 8p a photo.
 _______________________________________________
 postgis-users mailing list
 postgis-users at postgis.refractions.net
 http://postgis.refractions.net/mailman/listinfo/postgis-users
 


________________________________

To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre  .
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users



		
---------------------------------
Yahoo! Photos – NEW, now offering a quality print service from just 8p a photo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20051228/c83a3e7a/attachment.html>


More information about the postgis-users mailing list