I have a shapefile (shp) that is missing its dbf. I tried to load this into PostGIS using shp2pgsql and got the error.
could not open shapename.dbf
I opened it in QGIS, without issue, and when I clicked Open attribute table, I could see a column based on the shp's gid, but could not use the field editor to add a new field. Instead, I used, Save as and saved it as a new shp file.
This new shp file, once added to the map, did allow me to add fields and I can now successfully load it into Postgis using shp2pgsql.
Question: While the above works, it is a bit of a faff, and I am wondering if I have missed some obvious trick, either in shp2pgsql, QGIS, ogr2ogr, or some other application not mentioned.
ogr2ogr with_dbf.shp without_dbf.shpis cleaner for me than doing the same with QGIS. – user30184 Jan 21 '15 at 11:56