shptools can strip first and last points in polygon