In 754 AD, there were 1,859 cities in Tang China. All of them served as seats of government administration and were closely overseen by the central government. At this time,the largest cities in China were the two capitals, Changan in the west, and Luoyang in the east. Changan with a population of 2,000,000 may have been the largest city in the world. Changan began serving as the main capital of the Tang dynasty in 618.
The defensive walls around Changan were 18 feet high and they encircled 36 square miles. The walls prevented marauders, rebels, and bandits from entering the city unannounced. Climbing over the walls and entering the city was a serious offense. It was punishable by 90 blows with a rod or a year in a prison labor camp. Unfortunately, the walls were made of earth and they rarely withstood an attack. Citizens entered the city through heavily guarded gates. Changan had 12 gates in all, and each was manned by 100 guards. The gates were shut at dusk and secured. Roads in Changan were between 300 and 500 feet wide and made of rammed earth that turned into mud when it rained. There were ditches 7 feet deep and 11 feet wide on both sides of the road. The ditches were for rainwater and not for sewage. Human waste was collected and sold to farmers for fertilizer. The extra wide roads that were normally constructed in the Chinese cities served as excellent fire breaks. In 807, a fire in Changan destroyed over 17,000 homes.
In 582, the Changan emperors began planting trees all over the city. They planted elm, juniper, and fruit trees. They also constructed pagodas, and an important series of interconnecting canals. In all, Changan had five canals. The canals were 8 feet deep and 10 feet wide. The Tang used the canals for transportation, and to fill their lakes which were in parks. Largely the canals were used to haul grain, wood, and charcoal which were always in short supply. Occasionally, intruders would attempt to enter the cities by way of the canals. If they were caught the punishment was 90 whacks with a 3 foot wooden rod.
Changan was always fighting famines. For almost 200 years there were constant grain shortages. This was caused by two problems. The enormous population and the lack of affordable transportation. At the time, Merchants were forced to cart commodities along badly maintained roads for the last leg of the journey. The expense was tremendous. Then in 743, everything changed when the Commissioner of Land and River Transportation constructed a canal from the junction of the Yellow and Wei Rivers to a lake that was constructed close to the city of Changan. Eventually the lake served as a port for both capitals. Almost overnight the cheaper and faster water transportation ended the famines. During the following year over 1,750,000 bushels of grain were delivered to the city.
Changan was neatly divided into 110 wards (blocks) by its streets and avenues. The smallest of these wards was 68 acres and the largest was 233 acres. The wards were separated by 9 foot walls. Some wards were used to grow corps, while others had monasteries, temples, government offices, parks, shops, and homes. The wealthiest people lived in wards in the eastern half of the city. The bulk of the population was in the western half of the city, and it was filled with impoverished peasants including beggars, thieves, and transients.