Vector rivers update, NHDPlus / PostGIS problem

Boy, code rots. I tried to re-generate my vector rivers map from data. The project’s well documented, it should be easy, right! Ha.

My imports failed like this:

$ shp2pgsql -a -D -t 2d -s 4269 -W LATIN1 ./NHD/NHDPlusGB/NHDPlus16/NHDSnapshot/Hydrography/NHDFlowline.shp
Shapefile type: ArcZ
Postgis type: MULTILINESTRING[2]
Error in fread() reading object of size 1112 at offset 41917076 from .shp file
Error reading shape object 43130

I downloaded a new datafile from the source and now it works. The downloaded 7z archive is the same, I wonder if there was a problem when I extracted the data and an older version of shp2pgsql didn’t catch it? It’s not just that one file though, NHDPlusMS/NHDPlus05 is bugging out too.

Update yeah I must have had a problem extracting some of the files. Surprised my import script didn’t notice before. I wonder if earlier versions of shp2pgsql weren’t as meticulous about error reporting? Or maybe I had a clean extract last time I did a full import. The 7z archiver I have to use doesn’t handle being interrupted very well, I suspect it leaves behind incomplete files.