This article addresses autonomous collision avoidance in restricted waterways in compliance with maritime navigation rules. Since waterways may have diverse shapes, it is not straightforward to design a generic approach that can be applied to all types of waterways. In this article, we propose a shape-invariant coordinate system and a systematic collision avoidance procedure that complies with maritime navigation rules. The waterway space is defined using the coordinates in the along-track and cross-track directions to efficiently represent various types of waterway shapes. An automatic collision avoidance algorithm is designed and applied to the transformed coordinate system, which additionally takes into account the compliance with maritime traffic rules in restricted waterways. The performance of the proposed approach is evaluated in diverse types of waterways by performing Monte Carlo simulations, and the simulation results are presented and discussed.