3

I am trying to import a shapefile using shp2pgsql. I wrote this command:

shp2pgsql -I -s 2154 -W "LATIN1" W:\IGN\BDPARCELLAIRE-RGF93-LB93-MAJ2013-V4\BDPV_1-2_SHP_LAMB93_D01\COMMUNE.shp CADASTRE.COMMUNE | psql -U postgres -d omexom

But, when I execute this, I have an error :

Unable to open W:\IGN\BDPARCELLAIRE-RGF93-LB93-MAJ2013-V4\BDPV_1-2_SHP_LAMB93_D01\COMMUNE.shp or W:\IGN\BDPARCELLAIRE-RGF93-LB93-MAJ2013-V4\BDPV_1-2_SHP_LAMB93_D01\COMMUNE.SHP.
W:\IGN\BDPARCELLAIRE-RGF93-LB93-MAJ2013-V4\BDPV_1-2_SHP_LAMB93_D01\COMMUNE.shp: dbf file (.dbf) can not be opened.

I really don't understand, because I tried to import the same layer using the graphical interface PostGIS and it works.

Where am I wrong in my code?


The dbf file is present.

2
  • 1
    is the .dbf file present?
    – Ian Turton
    Mar 28, 2018 at 16:08
  • What happens if you open your shape file in QGIS or other desktop GIS? Can you open the attribute table?
    – Zoltan
    Mar 30, 2018 at 16:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.