[postgis-users] problem with shp2pgsql

Eric Haflett ehaflett at computersoftwareinc.com
Wed Dec 28 06:28:50 PST 2005


It looks like you have the command syntax wrong.  What is the '26911' part of the command?  I've used the loader quite a bit and here's how it has worked for me

 

Shp2pgsql input_shapefile.shp database.schema > output.sql

 

I've been using the following link as a guide...

http://postgis.refractions.net/docs/ch04.html#id2899793

 

I hope this helps.

 

EH

________________________________

From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of henok tadesse
Sent: Wednesday, December 28, 2005 8:37 AM
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 sha pefile 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20051228/c54f0232/attachment.html>


More information about the postgis-users mailing list