Rewrite shp(ts) parsing to avoid offset issues.  Fixes #6822.
Merge pull request #6823 from pchote/fix-shpts-offsets

Closes #6020