China Naming Network - Naming consultation - What are the functions of the city walls and gates of Xi in Ming Dynasty?

What are the functions of the city walls and gates of Xi in Ming Dynasty?

Xi Anming City Wall is rectangular, with a wall height of 12m, a bottom width of 18m, a top width of 15m and an east wall length.

2.5 kilometers, the west wall is about 2.6 kilometers long, the south wall is 3.4 kilometers long, the north wall is 3.2 kilometers long, and the total circumference is about 14 kilometers.

Ancient weapons and equipment were relatively backward, and the city gate was the only passage, so the city wall was the key point of defense. There are four gates in the east, west, south and north of Xi 'an, namely Changle Gate, Andingmen, Yongning Gate and Anyuan Gate. There are three doors in the four doors: the main building, the embrasured tower and the gatehouse.