Does "connect" mean the same thing in these two sentences?

The local train does not connect with the Amtrak train.

The planes don't connect and you will have to wait for four hours.
the same meaning