 The layout of ancient Chinese capitals , such as Bianjing , capital of the Northern Song , followed the guidelines in <unk> Gong Ji , which specified a square city wall with several gates on each side and passageways for the emperor . The outer city of ancient Bianjing was built during the reign of Emperor <unk> to a rectangular plan , almost square in proportions , about 6 km ( 3 @.@ 7 mi ) from north to south and 7 km ( 4 @.@ 3 mi ) from west to east . The south wall had three gates , with <unk> Gate in the center , <unk> Gate to the east , and <unk> Gate to the west . The other walls had four gates each : in the east wall were <unk> Gate ( at the southern end ) , <unk> Gate , <unk> Gate , and North @-@ East Water Gate ; in the west wall <unk> Gate , West Water Gate , <unk> Gate , and <unk> Gate ; and in the north wall <unk> Gate ( at the eastern end ) , <unk> Gate , New Wild <unk> Gate and <unk> Gate . The gates in the center of each of the four sides were reserved for the emperor ; these gates had straight passages and only two sets of doors , while the other city gates had <unk> passages and were guarded by three sets of doors . 
