How to have ships navigate the ocean and knights navigate the land?

What approach should I use for a game where you can make buildings on land, and, a shipyard on the coast line, and then build ships for the water area.

I figure it can probably be achieved with a navmesh with different areas for land and sea.

Is there a better approach?

@sarynth
Is this game for PC, mobile, console, or other?