Approximation of irregular polylines by means of a straight-line graph