This study investigates the enhancement of Maritime Autonomous Surface Ships (MASS) navigation and path-planning through the integration of ontology-based knowledge maps (KM) with the Dynamic Window Approach (DWA), a fusion termed KM-DWA. The ontology-based KM model is important for MASS navigation, offering a framework for situational awareness, including contextual information fusion and decision-making evidence. This research enriches the KM model with collision avoidance rules from the International Regulations for Preventing Collisions at Sea (COLREGs), building upon our previous work on MASS's efficient and COLREGs-compliant navigation in encounter scenarios. The model provides navigational context, covers COLREGs rules and environmental factors, and recommends MASS actions for various scenarios as suggested by COLREGs. Moreover, an adapted DWA, tailored to maritime navigation, accounts for specific constraints and safety measures for MASS, utilising KM-derived situational awareness as constraints in its cost function for path planning. A significant innovation introduced here is a tiered safety distance model featuring proactive, defensive, and collision buffers to ensure rule-compliant and effective collision avoidance. This scheme enables MASS to take timely collision avoidance actions at both proactive and defensive distances, in line with COLREGs recommendations. The effectiveness of the KM-DWA algorithm is validated by comparing it with the basic DWA algorithm in single- and multi-vessel encounter scenarios. The experiment outcomes illustrate the integrated approach's superiority in terms of COLREGs compliance and collision avoidance rate, emphasising its ability to support COLREGs-compliant decision-making and enhance situational awareness in autonomous maritime operations.