A implementation of a variant of k-means algorithm to get groups from the waypoints with the same size