Abstract
Ancient Chinese military castles were equipped with rapid transportation routes for mutual aid, and this was an essential indicator of regional defense capability. However, since the sites of these transportation routes have mostly disappeared, it is not easy to examine the actual distribution of these routes. It is necessary to speculate the trend and position of military routes on the basis of the castle locations. In this study, the geographic features of each castle location were extracted as factors affecting the efficiency of the intercastle transportation system using the ArcGIS cost path function. By analyzing the fit of each factor for screening and weight assignment, a time cost path was established, and a model was generated for calculating the efficiency of this transportation system. The Weihai area, a typical representation of sea defense during the Chinese Ming Dynasty, was taken as an example for simulation. Overall, five ancient military transportation routes were restored. The establishment of the Ming Dynasty Wendengying transformed the linear defense layout of the Weihai region into a longitudinal network layout, and its site selection was of great benefit to the overall defense of the coastal citadel of Weihai. This model breaks the traditional limitations of relying on subjective speculation for ancient road restoration and dramatically improves its accuracy and credibility. Moreover, it makes a significant contribution to judging the road systems of ancient cities in different regions and provides a new idea to quantify the efficiency of ancient castle defenses.
1. Introduction
China built top-down defensive cities in seven coastal defense zones during the Ming Dynasty, gradually building a coastal defense net [1]. The coastal city defense system had to be fortified along the entire coastline to ensure comprehensive monitoring of the coastal area. It also had to be fortified at the mouths of rivers or seas, so that it was always ready to defend against invasion. Therefore, throughout the evolution of the Ming Dynasty, the city gradually formed a deep layout from the coast inward, thus establishing a defense net system with the interior region supporting the troops [2]. In this system, the time cost of mutual assistance and coordination between different castles was a critical factor affecting the overall defensive efficiency, as determined by two core variables: distance and speed. Rapid support of infantry and cavalry during wartime is key to victory; thus, a consistent distance between castles is ideal.
The early studies on this issue were based on historical data on road organization and spatial layout changes in different historical periods. In recent years, some scholars have provided graphical quantification of the formation of spatial layouts based on GIS [3]. However, due to the absence of the main transportation routes between the original cities and towns, as well as the rough description of many historical materials, such as the figurative mapping method used in ancient China, the spatial location information of maps is seriously distorted [4]. Thus, the progress of quantitative research is slow and inaccurate. In existing military road traffic studies, linear distance is often used as an element to measure the location relationship of normal cities and castles. Since natural factors such as geography, hydrology, and human factors of marching often do not lead to the selection of a straight line in road construction, the existing research results are not realistic and effective in answering this question [5]. The information of known roads is often used in archaeology to recover data on original roads. Madry and Rakos selected the points of known roads for the recovery of Celtic roads in the eastern river valley of France; they then used these points to examine the correlation with relevant environmental elements, which were subsequently introduced as variables to calculate the cumulative cost of spatial movement, finally generating the shortest path [6]. Some scholars used ArcGIS to recover ancient roads, based on the function of the time cost path, superimposing the cost weights on the influence factors to generate the final path [7].
However, these models cannot be entirely objective and are still influenced by the analyst’s subjective choice of time and distance costs [8]. By extracting the objective geographic factors of the original military road points, combined with statistical tools to analyze the correlation between the influence factors and road points, before objectively assigning to them using CRITIC weight calculation, the cost overlay from an objective perspective can be generated. Then, this can be combined with the ArcGIS time cost distance function to realize the optimal path based on time cost. The original points can be used for fitting to judge the accuracy of the prediction model [5]. In order to objectively and quantitatively analyze the transportation efficiency of Ming Dynasty cities under the influence of various factors, this paper chose Weihai, a coastal city of the Ming Dynasty, as the study area. By simulating the time cost of the military road system between the existing cities in Weihai, this research was aimed at clearly highlighting the efficiency of the deep spatial assistance network hidden behind the city layout.
2. Materials and Methods
2.1. Study Area
Weihai is located in East China, to the east of the Shandong Peninsula. It is bordered by the Yellow Sea to the north, east, and south, and it lies across from the Korean Peninsula (Figure 1). Weihai was located in Ninghai Prefecture, Dengzhou District, Shandong Province, during the Ming Dynasty. At the beginning of the Ming Dynasty, there were four Xunjiansi cities: Xinwang, Wenquan, Qianshan, and Lushan. During Hongwu’s reign of 31 years (1398), to defend against Japanese pirates, the government set up defense stations in Weihai, Chengshan, and Jinghai, protecting the city of Ningjin. In the second year of Xuande’s reign (1427), Wendengying was established, and, in the years of Chenghua’s reign (1465–1487), three additional cities of Baichiya, Xunshan, and Haiyang were established. From a military point of view, Weihai, as the gateway to Shandong, was located at the forefront of the sea defense, with its three sides facing the sea. Upon Weihai’s defeat, the entire inland area of Shandong would be exposed. Weihai was also a major transportation route between China and Japan during the Ming Dynasty, simultaneously becoming a primary target for Japanese pirates. Therefore, the Ming government attached great importance to the defense of Weihai.

The layout of Weihai during the Ming Dynasty could be divided into a shoreline system and an inland system, featuring three primary levels: Ying City, Gui City, and Shou City. They defended each other independently, thus forming a linear defense belt, which was the main structure indispensable for coastal defense during the early Ming Dynasty. [9] As a later supplement, Ying City was established to optimize the original pattern of defensive garrison cities. Following the Japanese pirate invasion in the 14th–15th centuries during the Yongle period, the disadvantages of the original model gradually emerged. Although the coastal defense system held mountain and river fortresses, occupying favorable terrain, it was difficult to form a cohesive defense without any military settlements that served as a link between cities. In addition, pirates often chose to launch their invasions at gaps along the belt, thus exposing the inland cities once breaking the initial barrier. Accordingly, the original deployment strategy could not effectively organize joint defense and attack strategies [10].
In the second year of Xuande’s reign (1427), the government set up the inland hub of Wendengying. Ying City was a military unit above Wei City, which played the leading role in organizing guards to focus on destruction, defense, or unified dispatch in times of war. This created a comprehensive defense network of Wei–Suo–Ying from the coast to the inland regions, forming a perfect military mobility support system.
2.2. Data Collection and Visualization
This study extracted the information on coastal defense castles from “Chou Hai Tu Bian” and local chronicles from the Ming Dynasty. This book has records of the distribution and number of coastal defense castles during the Ming Dynasty and shows the relationship between the layout of military castles and the topography in conjunction with coastal topographic maps. On the other hand, local history books feature information on many aspects of each region’s geography, humanities, customs, politics, economy, culture, education, and military activities, including the possible locations of major transportation routes. Bao City, used for the model test, was next to an ancient military road, which served as a post station, transmitting information and providing temporary accommodation for the marching troops [11].
The geographic coordinates of the castle used in this study were a combination of those obtained from field exploration and those based on historical records to achieve maximum accuracy (Table 1). Through field research, we obtained the latitude and longitude coordinates of the existing ancient military road connection of Bao City and combined them with the DEM data (horizontal accuracy of 30 m and vertical accuracy of 20 m) published by the Global Academy of Sciences Computer Network Center, as well as with the actual extracted data of the geographic environment elements of Bao City along the ancient military road (Figure 2) [12]. Shili Bao, Ershili Bao, Sanshili Bao, Sishili Bao, and Dunqian Bao were all the connections in Bao City along the ancient military road of Wendengying. Since these connections in Bao City followed a military strategy of consistent spacing, we can consider them homogeneous interruption points along the road.

2.3. Methods
The path distance and marching speed were calculated to determine the optimal time cost of each city’s efficiency. In ancient times, since the marching speed of an army was relatively fixed, the choice of roads based on different geographical environments significantly affected the path distance and, thus, the time cost [13]. Therefore, the simulation data of the path distance between the coordinates of the origin and destination military castles can be a vital indicator of their efficiency. Figure 3 shows a technical roadmap of the military path prediction model.

2.3.1. Environmental Factor Selection
The determination of an ancient military road depends on the judgment of geographical factors, and the first step is their extraction as the dependent variables [14]. The most important influencing factor in the natural geographical state is the terrain. Topographic factors can be subdivided into two parts: macroscopic and microscopic. Terrain roughness is the degree of unevenness of the surface, which reflects the surface morphology at the macro level. Terrain relief is the difference between the highest and lowest elevation in a specific area, which expresses the magnitude of elevation change in the area. It can also be an indicator of the macro topographic features in a region. The aspect change rate is the degree of change in slope direction, which is extracted as a function of the topographic slope direction, responding to the correlation between the degrees of change in contour curvature and road curvature. The slope change rate is the degree of change in ground slope, which is an indicator of the micro topographic features in a region, responding to the profile curvature [15].
Among the geographical factors, hydrological factors have significant uncertainty. There are two reasons why hydrological factors were not relevant for determining the geographic environment in this study. Firstly, hydrological factors vary significantly over time, and the hydrological data available from poststatehood water construction cannot be used as a criterion for determining the geographic status during the Ming Dynasty. Secondly, among the factors influencing road alignment, hydrological factors are defined according to the scarcity of water resources in a specific region. A previous study considered the distance between the road and the water source as an essential geographical factor in road alignment determination, taking into account the local annual precipitation of <200 mm/year [7].
Weihai, China, is located in the north temperate monsoon continental climate zone, with an average annual precipitation of approximately 800 mm/year according to data from 1964 to 2018 [16]. Moreover, through a cross-validation of DEM data on the waterline generation of the Weihai landform with the current hydrological situation of Weihai, it can be obtained that both river networks exhibited a uniform and dense waterline distribution (Figures 4 and 5). Thus, the influence of hydrology could be excluded from road alignment determination.


2.3.2. Coordinate Point Data Extraction
Using information extraction tools such as ArcGIS, the obtained spatial latitude and longitude coordinates of the ancient military road connection of Bao City were combined with the 30 m DEM data to generate information on four geographic factors: terrain roughness, terrain relief, aspect change rate, and slope change rate (Table 2).
For a final correlation of the factors involved in the cost overlay, we used the univariate chi-square test (Tables 3–6), which is often used in archaeology to test the correlation between site settlements and their environmental factors [17]. In a study of the recovery of the Celtic road system of Arroux Valley in east–central France, the authors also used the univariate chi-square test after identifying the sampling points to test their validity [18].
The first column in the above tables represents the four environmental influence factors. Using the natural discontinuity point classification method [19], the terrain roughness, terrain relief, slope change rate, and aspect change rate within the scope of the connected Bao were classified into three levels. The second column represents the number of connected Bao Qi corresponding to different environmental factors. The third column represents the area statistics for the three levels of each environmental factor based on ArcGIS. The fourth column represents the calculated proportion of the graded area. The fifth column uses the data in the second and fourth columns to calculate the expected number of connected Bao for the different levels of terrain. Accordingly, the following null hypothesis H0 can be proposed: the distribution of connected castles has nothing to do with the evaluated environmental factor. Then, the χ2 statistic can be determined under the premise of H0 according to the following formula:
The calculated terrain roughness χ2 was 11.53, the calculated terrain relief χ2 was 7.92, the calculated slope change rate χ2 was 10.64, and the calculated aspect change rate χ2 was 7.57. Dividing the four environmental factors into three levels followed a chi-square distribution of 3 − 1 = 2 degrees of freedom.
According to the standard χ2 function distribution table, at a significance level of 0.05, the chi-square value for two degrees of freedom is 5.99, which is less than that of χ2 calculated for the four environmental factors. Therefore, at the 0.05 level of significance, we can reject the null hypothesis, suggesting that the distribution of connected Bao is correlated with the four environmental factors.
2.3.3. Cost Path Model Construction
The cost path was generated as a function of cost surface analysis. Each point on the surface denotes the cumulative minimum cost consumption from a fixed point on the map according to the ArcGIS grid layer [20]. The LCP method commonly used in archaeology was selected as the path generation model, which allows reconstructing a road or determining the key elements that control the route selection [21]. A previous study classified the cost and path distance functions and discussed path generation [22]. However, the path distance analysis was more suitable for integrating energy and time costs to calculate the lowest cumulative price in the simulation of military route selection during the Ming Dynasty. The path distance function represents movement in terms of time spent. Furthermore, the action on the steep slope in all directions can be integrated with the topographical characteristics [23].
Before the path distance analysis, a horizontal cost-weighted map of each pixel in the ArcGIS map was obtained for the four geographic elements, as shown in Figure 6. And before synthesizing the weighted cost, a scatter diagram verification of the four geographic factors was conducted on the basis of the classification category and the number of connected Bao (Figure 7).

(a)

(b)

(c)

(d)

According to Figure 7, terrain roughness and terrain relief both had a linear relationship with the point distribution, thus satisfying the linear cost relationship of ArcGIS reclassification grading. On the other hand, the slope change rate presented a nonlinear relationship and, thus, did not satisfy the linear cost relationship; as such, it was removed from the final weighted superimposed cost.
In summary, the correlation test found four environmental factors that had a relationship with military connections distributed in Bao City. Following reclassification, the slope change rate was found to have a nonlinear relationship with the connected Bao. Therefore, terrain roughness, relief, and slope change rate were selected in the ArcGIS cost level overlay index to stack the three-tiered costs. The weighted superposition of all three factors enabled the generation of a weighted superposition map, as shown in Figure 8.

The criteria importance through entering criteria correlation (CRITIC) objective weighting method was used to analyze the weight of impact factors in a nonsubjective way. The method involves determining the objective weight of evaluation objects as a function of contrast intensity and conflicting indicators. The contrast intensity can be expressed as the standard deviation, whereby a larger value indicates greater fluctuation and a larger weight. The conflicting indicators can be expressed as the correlation coefficient, whereby a more significant value indicates minor conflict and a smaller weight. The normalized product of the contrast intensity and the conflicting index can be used to calculate the final weight (Table 7) [24].
Before applying the CRITIC weighting method, the data units for each influencing factor were unified, thus obtaining dimensionless factors for objective weight analysis. As shown in Table 7, the CRITIC weights were 47.51%, 25.94%, and 26.54% for slope change rate, terrain roughness, and terrain relief, respectively. From an entirely objective perspective, the macro-environmental factor slope change rate accounted for the highest proportion, while the micro-environmental factors terrain roughness and terrain relief accounted for a smaller proportion. When only considering the topographic environmental factors, the distribution of connected Bao along ancient military roads was mainly influenced by the slope change rate. The data were then used to accurately determine the influence of different environmental factors on the military road alignment by means of objective weighting using the ArcGIS surface cost overlay function (Figure 9) [13].

3. Results
Wendengying was an inland military hub in the Weihai area, which had significant links with Wei City and Suo City along the coast during the Ming dynasty. Although the connected Bao along the route have been excavated, their small number means that they did not form an accurate continuous path along the route, thus hindering an accurate measurement of the efficiency of troop rescue between inland military hubs and coastal military units.
The pattern of ancient military road selection in the Weihai area was obtained by validating the route simulation tool for the simulation of major military roads in the same area. Wendengying, as the inland military hub, was used as the starting point of the military routes to Weihaiwei, Chengshanwei, Xunshanwei, Ningjinwei, and Jinghaiwei (Figure 10).

After obtaining the simulated time cost paths, the ancient marching speed was determined to calculate the efficiency of defense support between the inland and coastal defense castles. In the pre-Qin period military book “Yuliaozi—Heeding the Military Order,” it is recorded that a routine army of assembled infantry at that time marched at 30–40 Li per day. The road system and supply of provisions limited the speed of the military during routine marches. Packhorse wagons were used to carry heavy baggage behind the troops; moreover, the roads were trampled by large groups of troops, further affecting the speed of the march. The speed of the army was also affected by the need to defend against enemy attacks and to carry out scouting during the march.
In addition to routine marches, rapid marches were also an essential military element in ancient warfare. According to The Book of Han—The Biography of Huo Qubing, Huo Qubing marched more than 1000 Li in 6 days, representing an average of approximately 160 Li per day. In addition, during the Ming Dynasty, in August 1550, Tatar leader Ida Khan captured Datong and marched more than 150 Li in a day and a night. Following unit conversion, it can be obtained that the Ming Dynasty rapid marches could complete 50–80 km per day, whereas infantry could achieve a speed of 16–20 km per day [25]. In order to reach the battlefield quickly, ancient rapid marches often abandoned provisions and rode lightly. During the Ming Dynasty, the sea defenses of Wei City and Suo City would require prompt support, a need that could be met without military supplies and survival materials. The connected Bao evenly distributed along the ancient military road provided logistical support for the galloping army, as preplanned for long runs of the rescue forces. By measuring the distance of the five time cost paths with reference to the ancient marching speed, the ancient military road rescue efficiency could be calculated (Table 8).
4. Discussion
After obtaining the five time cost paths, the accuracy of the military road from Wendengying to Weisho Castle was further verified due to a lack of information on the sites of connected Bao. Thus, we selected the five connected Bao located along the military road with proven location information. Then, simulated paths from Shili Bao to Dunqian Bao were generated. This allowed verifying the accuracy of the prediction model by observing the relationship of the remaining connected Bao along the military road from Shili Bao to Dunqian Bao using the simulated path (Figure 11).

As shown in Figure 11, the simulated path generated from Shili Bao to Dunqian Bao was obtained. It was determined to pass directly through Ershili Bao and close to Sanshili Bao and Sishili Bao. To obtain the shortest straight-line distance between the simulated path and the connected Bao (Table 9), we used the neighborhood analysis function. The shortest distances between the three connected Bao located between the start and endpoints and the simulated path were 22.44 m, 472.15 m, and 179.88 m. However, the location of the connected Bao according to the prediction model was presented in the form of coordinate points, ignoring the castle size. Thus, it was necessary to consider the castle dimensions for validation. The average perimeter of most square castles in the Weihai area was around 800 m, with a side length of 200 m [26]. By considering the distance between the castle boundary and the simulation path, the distance between Ershili Bao or Sishili Bao and the simulated path was <200 m, while that between Sanshili Bao and the simulated path was approximately 472.15 − 200 = 272.15 m. All distances were within a reasonable range; hence, the location relationship was deemed accurate.
The military roads generated by the path distance function could successfully explain the ancient army’s tendency to choose the geographically influenced optimal time cost path. Furthermore, the ancient military and civilian roads were established separately and independently on the basis of their different functions. The primary function of the ancient military road was to transmit military information and provide troop support; therefore, military activities could be carried out more efficiently at the lowest time cost.
The overall geographic environmental factors are the primary conditions to be considered for the siting of ancient military roads, which can be predicted and recovered using geographic information models. However, there are inevitably subjective factors in the road siting process. In this study, the straight-line distance between the fortress walls and the simulated path in the prediction model was typically within 500 m, which is an acceptable deviation. Difficulties in the application of this model exist in the cross-analysis of subjective and objective factors of ancient road siting and the implementation of tradeoffs when different results occur. Accordingly, more information from historical materials is required to determine the accuracy of these roads.
5. Conclusions
By using quantitative analysis to develop a predictive model of the Weihai ancient military road, this research explored the efficiency of inland military hubs in supporting coastal cities during wartime. The prediction model extracted and analyzed existing sites to obtain the environmental impact factors affecting the location of the ancient military road. Then, an objective weighting analysis was conducted to obtain the weighting values of the impact factors. This model is also applicable to the prediction of road traffic in other military settlements. It could be used to objectively explain the spatial layout of Wendengying, a military city in Weihai during the Ming Dynasty, and it could also be used to evaluate the efficiency of the city’s rescue efforts and the transmission of ancient traffic information.
Following a simulation of the optimal time cost path taking into account the Ming Dynasty marching speed, the actual support efficiency of Wendengying during coastal warfare was obtained. The spatial location of the Wendengying battalion was expertly chosen to enable effective support to several Wei City and Suo City within half a day at the earliest, which was a critical factor in a successful defense in the event of war. This also demonstrates that the layout of inland military hubs was closely linked to the efficiency of military rescue and that the characteristics of the geographical environment were critical factors in determining the location of ancient military roads.
Data Availability
All the data used in this paper are directly shown in the tables of this paper, and there is no other external data.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
This work was supported by the National Natural Science Foundation of China (52078324 and 51778400) and Major Research on Philosophy and Social Sciences of the Ministry of Education of China (19JZD056 and 18JZD059).