I think you will need to hard code rules for determining which ocean a body of water belongs to.
Do ocean’s actually have legally defined boundaries anyway, or just blend into each other in a fairly informal way?