Calculate statistics from lines