A new result in optimal control provides a unified approach to optimizing the navigation of large vessels as they pass through waterways and harbors to and from their berthings. Depending on vessel size and channel characteristics, significant time and fuel can be expended to safely guide the course and speed along a specified path. Safe paths have historically been developed using well-established heuristic relationships involving channel depth, obstacle/traffic clearance, traffic volume, water current, tides, visibility, and weather. Typically a large vessel is guided through a set of waypoints to arrive at or depart from its berthing. Between waypoints, however, some flexibility in the path is permitted. The objective of this study is to utilize this flexibility to optimize the ship trajectory between waypoints to minimize time or fuel, in the absence of other vessel traffic. Ship paths are tailored to vessel characteristics such as length, draft, and displacement. The multiple-interval generalization of Pontryagin's Maximum Principle, established in a pending PhD dissertation, is proposed to find the optimal trajectory of the vessel. The generalization addresses the total navigation problem, from harbor entrance to berthing, and optimizes the path accordingly. An example based on design characteristics of a Panamax cargo ship is set up, and solution methods are explored.