[postgis-users] problem with shp2pgsql

Barend Köbben kobben at itc.nl
Wed Dec 28 07:08:07 PST 2005


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 <kobben at itc.nl> 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 <http://us.rd.yahoo.com/mail/uk/taglines/default/security_centre/*http://uk.security.yahoo.com/> .
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 6807 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20051228/2bc375c0/attachment.bin>


More information about the postgis-users mailing list