The town lies on the Koblenz–Trier line, which between Cochem and Ediger-Eller runs through the Kaiser-Wilhelm-Tunnel, which from its completion in 1877 until 1887 was Germany's longest tunnel at 4 kilometers .