Closed twpayne closed 1 year ago
Hi Tom, nice to meet you again in GeoRust land :-) I took these test files from https://github.com/tmontaigu/shapefile-rs, but GDAL would probably have better shapefiles for testing. In general, there would be a lot to improve in the shapefile driver, but since I use shapfiles so rarely these days, my personal priority is very low.
Thanks for this project. I'm not a Rust user, but I'm writing a Shapefile parser for Go and am testing my code with your testdata. I think some of your example Shapefiles are incorrect, which may in turn be concealing bugs in your code.
I'm using GDAL as a reference implementation. GDAL includes an
ogrinfo
command that can be used to query Shapefiles:Note that GDAL requires a
.shx
index file. For many of your test Shapefiles, these do not exist. I've been using this tip to create a.shx
file where they are missing.I believe that the following errors in your test Shapefiles are present:
geozero-shp/tests/data/pointz.shp
: bounds in header do not match bounds of data; first record should have record number 1, but has record number 0.geozero-shp/tests/data/polygon.shp
: the polygon is invalid because its rings are not closed.geozero-shp/tests/data/poly.dbf
(note that this in in the.dbf
file): the dbf file is missing the\x1a
terminator.