 During the Song dynasty , the city of Bianjing had three enclosures : the outer city wall , the inner city wall , and the palace at the center . The inner city was rectangular , with three doors on each side . The palace enclosure was also rectangular , with a watch tower on each of the four corners . It had four main gates : <unk> Gate to the west , <unk> Gate to the east , <unk> Gate to the north , and Xuande Gate , also known as <unk> Gate or <unk> , at the south . Xuande Gate had five @-@ <unk> doors , painted red and decorated with gold <unk> ; its walls were lavishly decorated with dragon , <unk> and floating @-@ cloud patterns to match the carved beams , painted <unk> and glazed @-@ tile roof . There were also two glazed <unk> , each biting an end of the <unk> ridge , its tail pointing to the sky . The symbolic function of these chi wei was explained in Yingzao Fashi : 
