Most of the world’s great cities are coastal, located to take advantage of transportation, trade and the oceans’ resources.