[postgis-users] shp2pgsql segmentation fault
R. Piepul
rpiepul at dataflowdesign.com
Mon Feb 24 10:56:00 PST 2003
Hi Jeff,
Thanks for your help. Problem solved. I had a misconception about
using txt2dbf and gen2shp.
>>>>> "Jeff" == Jeff Lounsbury <jeffloun at refractions.net> writes:
Jeff> I try to open the Shapefile in Arciew and it errors with :
Jeff> "Number of shapes does not match number of table records",
Jeff> there are 19 table records in the dbf file from what I can
Jeff> see, check again when you are creating the data to verify
Jeff> that both file are based on the same dataset exactly? -Jeff
It appears that I incorrectly constructed the ascii files used to
create the shape files. There were 18 data records. I think (someone
please correct me if I am wrong) that txt2dbf requires a header record
with field names. gen2shp, on the other hand, does not, but I had one
in the file. Removing this header record form my ascii coordinate file
and rerunning shp2pgsql solved the problem. Thanks very much for
taking the trouble to examine the shape file and pointing out the
problem.
Regards,
Rob
Jeff> "R. Piepul" wrote:
>> Hi List, I have a shape file with 15 attributes that causes
>> shp2pgsql to terminate with a segmentation fault. I originally
>> ran it with 2150 point features which resulted in only 2139
>> insert commands written to the output file. The last insert
>> command was incomplete.
>>
>> I also tried shape files with 18, 2, and 1 feature (all point
>> features). These also resulted in seg faults.
>>
>> My OS is FreeBSD 4.5 shp2pgsql was built from CVS on 22
>> Feb2003. The shapefiles were produced using gen2shp and
>> txt2dbf. http://intevation.de/~jan/gen2shp/gen2shp.html
>> http://www.usf.uni-osnabrueck.de/~fkoorman/software/dbftools.en.html
>>
>> I've attached the shape files containing 18 point
>> features. There are 15 attributes. If you wish other files
>> please let me know and I will provide them. Thanks for your
>> help, Rob
More information about the postgis-users
mailing list