sort points by length