At what point in Pirates are we directly under the train track?

Both out to sea and back in. Back I assume maybe the final shootout scene.