Throughout Nanjing's history, writers have claimed that its spectacular landscape of mountains and rivers imbued the city with "royal qi," making it a place of great political significance. City of Virtues examines the ways a series of visionaries, drawing on past glories of the city, projected their ideologies onto Nanjing as they constructed buildings, performed rituals, and reworked the literary heritage of the city. More than an urban history of Nanjing from the late 18th century until 1911 -- encompassing the Opium War, the Taiping occupation of the city, the rebuilding of the city by Zeng Guofan, and attempts to establish it as the capital of the Republic of China -- this study shows how utopian visions of the cosmos shaped Nanjing's path through the turbulent 19th century.