[postgis-users] shp2pgsql: can we ignore invalid (corrupted?) .DBF?

kreshna_iceheart at yahoo.com kreshna_iceheart at yahoo.com
Wed Mar 26 02:15:59 PDT 2008


I'm trying to convert SHPs to postGIS tables, but I encountered two kind of problems regarding to invalid DBF.

The first SHP shows weird ASCII characters when I tried to convert it, and the process failed with the following error message:
NULL,fread(45816) failed on DBF file.
(complete error message attached)

When I opened the first SHP with Quantum GIS, its attribute table shows weird ASCII character on column names (pic attached).


The second SHP does not show ASCII characters when I tried to convert it, yet it also failed with the following error message:
dbf file(.dbf) can not be opened.

And when I tried to open the second SHP with Quantum GIS, its attribute table only shows one single column named "ID" (pic also attached).


Yet DBF files do exist for both SHP. What's wrong? What's going on?

Can I just convert the attribute data while completely ignoring the invalid .DBF attribute? What is the shp2pgsql switch for the purpose?


Thanks,
-Kresh




__________________________________________________________________
So be it. If saying "NO" means being alone, then to hell with love, with women, with marriage, with God, religions, bars, nightclubs, computer games, and all the shit life keeps pumping at me. I'll walk alone, but with freedom and a healed pride.
       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080326/76acefb2/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: batas_admin_log.txt
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080326/76acefb2/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01-shp-that-failed-on-DBF-file.jpg
Type: image/jpeg
Size: 65957 bytes
Desc: 340787012-01-shp-that-failed-on-DBF-file.jpg
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080326/76acefb2/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02.shp-where-dbf-cannot-be-opened.jpg
Type: image/jpeg
Size: 52274 bytes
Desc: 1894180269-02.shp-where-dbf-cannot-be-opened.jpg
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080326/76acefb2/attachment-0001.jpg>


More information about the postgis-users mailing list