shp2pgsql command to import shapefile

by Saifeddine Farjallah   Last Updated May 15, 2019 15:22 PM - source

I have a problem loading my shapefile named watershed and link it to my table in postgresql named watershed as mentioned here:

shp2pgsql -I -s 32632 C:\Users\ASUS\Desktop\master_PEER\DATABASE\Shapefile\watershed.shp watershed | psql -U postgres -d Chiba_watershed.

shp2pgsql : Le terme «shp2pgsql» n'est pas reconnu comme nom d'applet de commande, fonction, fichier de script ou programme exécutable. Vérifiez l'orthographe du nom, ou si un chemin d'accès existe, vérifiez que le chemin d'accès est correct et réessayez. Au caractère Ligne:1 : 1 + shp2pgsql -I -s 32632 C:\Users\ASUS\Desktop\master_PEER\DATABASE\Shap ... + ~~~~~~~~~ + CategoryInfo : ObjectNotFound: (shp2pgsql:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException


[2]: text

How to resolve this problem?

Answers 1

It looks as though shp2pgsql is not recognised. You may need to either

A) Run with the full path to the folder containing shp2pgsql.exe in front of shp2pgsql in the command


B) You need to make sure that the shp2pgsql.exe is in a folder that's on the PATH environment variable

May 15, 2019 14:36 PM

Related Questions

yum install postgis on centos

Updated March 25, 2018 18:22 PM

PostGis st_dwithin super slow when inserting

Updated January 17, 2018 00:22 AM