Sunday 30 April 2017

Postgis shapefile loader 2.1 error: dbf file can not be opened


The .shp, .dbf and the rest of files are fine, I open them in QGIS, AGOL with no problem. In fact, I've tried 3 different layers, and get always the same error.


Anyone can please help, as I really need to migrate my .shp's to postgis, and have no idea of why it's not able to open .dbf?


Postgres v9.3 x86 Postgis shapefile loader v2.1


Thanks a lot in advance!


PS I've tried changing the default character encoding from the default 'UTF-8' to 'ISO 8859-14' but same error.



Answer



Please check out http://www.gdal.org/ogr/drv_pg.html GDAL OGR2OGR to load shapefile data into postgis


Ogr2ogr Command to import shape into postgis


ogr2ogr -f "PostgreSQL" PG:"host=myhost user=username dbname=mydbname password=mypassword" your_shapefile.shp



For details http://www.bostongis.com/PrinterFriendly.aspx?content_name=ogr_cheatsheet


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...