When the Song capital was removed far south to Hangzhou, massive numbers of people came from the north. Unlike the flat plains of the north, the mountainous terrain riddled with lakes and rivers in southern China is largely a hindrance and inhospitable to widespread agriculture. Therefore, the Southern Song took on a unique maritime presence that was largely unseen in earlier dynasties, grown out of the need to secure importation of foreign resources. Commercial cities (located along the coast and by internal rivers), backed by patronage of the state, dramatically increased shipbuilding activity (funding harbor improvements, warehouse construction, and navigation beacons). Navigation at sea was made easier by the invention of the compass and Shen Kuo's treatise of the 11th century on the concept of true north (with magnetic declination towards the North Pole). With military defense and economic policy in mind, the Southern Song established China's first standing navy. China had a long naval history before that point (example, Battle of Chibi in 208), and even during the Northern Song era there were concerns with naval matters, as seen in examples such as the Chinese official Huang Huaixin of the Xining Reign (1068–1077) outlining a plan of employing a drydock for repair of 'imperial dragon boats' (see Science and technology of the Song dynasty). Already during the Northern Song, the Chinese had established fortified trade bases in the Philippines, a noted interest of the court to expand China's military power and economic influence abroad. Provincial armies in the Northern Song era also maintained naval river units. However, it was the Southern Song court that was the first to create a large, permanent standing naval institution for China in 1132. The new headquarters of the Southern Song Chinese admiralty was based at Dinghai, the office labeled as the Yanhai Zhizhi Shisi (Imperial Commissariat for the Control and Organization of Coastal Areas). Even as far back as 1129 officials proposed ambitious plans to conquer Korea with a new navy and use Korea as a base for launching invasions into Jin territory, but this scheme was never achieved and was of secondary importance to maintaining defense along the fluctuating border with Jin.