Reply on RC2

Records of urban extent are useful for not only investigating the urban development, especially for China, which has a long history of urban activate as well as among one of the fastest urban development hotspots worldwide. Many urban extent datasets have been produced in the past decades, benefited by the unprecedented capability of both Earth observation and machine learning; however, these datasets mainly focus on delineating the urban-related land covers, e.g., impervious surface, for the past 4 decades or so, due to the relatively short history of Earth observation. Extending the records deeper into the history of urban extent would provide a more complete picture of the urban development. Thus, I believe that datasets with an older/longer history of urban development would provide valuable information for complementing the urban records provided by the other urban land cover dataset. However, I think there are still flaws in both the manuscript and the presented dataset. These need to be addressed before the manuscript to be published.

further clarifications would be needed. Can a city wall equal or able to represent the actual urban extent? The construction of the city wall would have taken decades to complete, and the extent of the wall could considerably lag behind the changes of urban extent. I can agree that the main urban activities were inside the city wall, but I don't believe it's completely within it, especially during peaceful and economically prosperous times. Both Ming and Qing dynasties had large territories and enjoyed long peaceful and prosperous periods, particularly for areas away from the border. Representing the urban extent with only the extent of city wall would significantly underestimate the actual urban extents for many cities in the two dynasties. The authors argued in the manuscript that the city wall has been used to study the extent of cities, and I think it could be reliable for some individual cities, but I could not agree that the city wall can be used as the indicator for all cities.
Response: We thank the reviewer for the suggestion. And we think your opinions are very crucial. How can the scope of a city wall represent the actual urban extent, is one of the key issues of this research. Our discussions on this issue are clearly inadequate, and we will make further clarifications in the revised manuscript.
We believe that although the construction of the city wall took a long time, it was a functional building with high cost. And it would be built only when it was of vital importance to military and economic defense. Therefore, the scope of the city wall must be adapted to the physical boundaries of the urban built-up area at that time. But on the other hand, as you pointed out, the urban extent would not remain unchanged forever, it would change accordingly with the increase of decrease of urban residents. For example, the overflowing population would build contiguous settlements outside the city wall, especially during periods of peaceful and prosperous periods. And during these periods, the scope of city wall could not be consistent with the actual urban land use. After comprehensive consideration, we think that the city wall could be regarded as the urban boundary at least during the period when the city wall exerts its functional role; and the closer the time to the construction of the city wall, the more consistent the scope of city wall and the urban extent. Therefore, as long as the appropriate periods were selected, the scope of city walls in these periods could be very approximately regarded as the urban extent. For discussion about these issues, please see lines 77-98 and 267-288 of the revised manuscript. Therefore, we provide two datasets, namely the China City Wall Areas Dataset (CCWAD) and the China Urban Extent Dataset (CUED). Firstly, we produced the CCWAD, which reflected the scope of the city walls in China during the Ming and Qing Dynasties. After that, we studied the history of the city wall construction in the Ming and Qing Dynasties, and selected six representative years (i.e., 1400, 1537, 1648, 1708, 1787, and 1866) from the peak period of city wall construction to generate the CUED, which reflected the urban extent in the six representative years. For the process, methods and principles of the above works, please refer to lines 289-311 of the revised manuscript.

Comment 2:
The cities wall were mainly built for large cities. Could it lack representation for smaller cities or towns?
Response: We thank the reviewer for the suggestion. According to this study, cities in the Ming and Qing periods generally built city walls (see lines 433-443 of the revised manuscript). Our dataset contains 2,376 cities, most of which are smaller cities such as county seats. These cities, as we described in lines 294-299 of the revised manuscript, 80% of them walled in the 15th century, and 95% of them walled in the 16th century. So we think that in this study, the representation of smaller cities should be sufficient.

Comment 3:
The dataset has no validation. I understand that validation for such a historical record is difficult, but I am afraid that it cannot be accepted without comprehensive validation. Nevertheless, I think there could be still ways to assess its quality, for example, evaluating the changes of the extents for particular regions with reliable urban records?
Response: We thank the reviewer for the suggestion. As you pointed out, we did not find a comprehensive validation method. All the reliable urban records (such as historical literatures, old maps and remote sensing image) that we can find are collected and used in the restoration work based on the historical urban morphology theory. This part of the research is inductive and based on experience. And its results are derived from the summary of various records, rather than from hypotheses or prior models. So it may be difficult to find the suitable validation method. In order to remedy the lack of quality verification of the dataset, we designed the 'accuracy rankings' so that users with different needs can decide how to use these data. Please refer to Section 6 of the revised manuscript.

Comment 4:
Line 241-248, the authors explained the challenges of using the city wall for representing the urban extent. However, the manuscript did not carry out a convincing solution to address those.

Response:
We thank the reviewer for the suggestion. Our discussions on this issue are clearly inadequate, and we will make further clarifications in the revised manuscript. We think that if the appropriate periods were selected, the scope of city walls in these periods could be regarded as the urban extent. This is why we provide two datasets, namely the CCWAD and the CUED. And the CUED only reflects the urban extent in the six representative years (i.e., 1400, 1537, 1648, 1708, 1787, and 1866). We believe that in these six representative years, the scope of the city wall is highly consistent with the urban extent. For the process, methods and principles of these work, please refer to lines 289-311 of the revised manuscript.
Response: Thank you very much for pointing out this. We will correct it in the revised manuscript.
Changes in the revised manuscript: Please see line 38 of the revised manuscript.

Line 150-151, why a city is considered a new city when it is chosen as an administrative center? What if the city was already there, and got chosen later to become an administrative center?
Response: We thank the reviewer for the comments. This is because the objects of our study only include administrative cities. Lines 122-125 of the revised manuscript defined the 'city' of this study. So 'if the city was already there, and got chosen later to become an administrative center', in this case, data before the 'city' became the administrative center were not included in our datasets. This definition of city obviously excludes some settlements that should be regarded as cities, but we haven't made enough clarification in the preprint. We will make further explanation in the revised manuscript. Thank you very much for pointing out this.
Although almost all cities in the late imperial China can be classified as administrative cities, we must point out that the following types of settlements can also be regarded as 'cities', but they are not included in our datasets. (a) In the late imperial China, the industrial and commercial settlements without administrative agencies were generally called 'markets (shi)' or 'towns (zhen)'. The size of the town was generally smaller than the lowest administrative center, the county seat. But there were also some huge towns, such as Hankou, Foshan, and Jingde, etc., whose scale exceeded the county seat and even higher-level cities. These huge towns should undoubtedly be regarded as cities, but they are not in scope of this research. (b) If a city was already there, and got chosen later to become an administrative center, in this case, data before the 'city' became the administrative center were not included in our datasets. (c) Cities outside the direct administration of the Ming and Qing empires, such as Lhasa. (d) Cities belonging to colonists, such as Macau, Hong Kong, and Qingdao, etc. The definition of 'city' or 'urban' in the late imperial China is complex and far from conclusive, but we hope that the content of our datasets to have a clear border. Therefore, in this study, we defined "city" as the settlement which the administrative center was located. And this definition is the same as the general research practice of pre-modern China.
Changes in the revised manuscript: Please see lines 444-460 of the revised manuscript.
proportion should generally be more than 90%, except in the 14th and early 15th centuries. Secondly, after the city walls were built, the scope of the city walls generally did not change with the built-up areas over time, so the representative years should be within only one or two years after the end of a large-scale construction activities. In addition, the representative year should be selected at a moderate level of changes in the scope of the city wall within the period. Finally, the representative year should avoid major political, military events and severe natural disasters in order to reflect the general level of urban development in that period. Please see lines 289-311 of the revised manuscript.

Comment 10:
Line 202-203, Google Earth is a tool, not a platform.
Response: Thank you very much for pointing out this. We will correct it in the revised manuscript.
Changes in the revised manuscript: Please see line 229 of the revised manuscript.

Comment 11:
Line 256, what's the implication of the correlation?
Response: We thank the reviewer for the comment. We think that the word 'correlation' may not an accurate expression. There is only some connection between the number of wall constructions and the area of the walls scope, that is 'the periods of more constructions were often of faster area growth, and the less construction periods were always of area decline or unchanged' (lines 292-294 of the revised manuscript). We will make improvements in the revised manuscript.
Changes in the revised manuscript: Please see line 291 of the revised manuscript.

Comment 12:
Line 268, please clarify how the proportion of cities were calculated? What's the number of total cities? Response: We thank the reviewer for the comment. The total number of all cities (figure 7d) and the total number of walled cities (figure 7e) were obtained through annual query in the CCWAD dataset. The walled cities' proportion of all cities (figure 7c) was obtained by dividing the number of walled cities in each year by the total number of cities in the year.

Comment 13:
Line 296-297, please rephrase the sentence to fix grammar errors.
Response: Thank you very much for pointing out this. We will correct it in the revised manuscript.
Changes in the revised manuscript: Please see lines 344-346 of the revised manuscript.

Comment 14:
Line 298, add "a" before "slow rate". Response: Thank you very much for pointing out this. We will correct it in the revised manuscript.
Changes in the revised manuscript: Please see line 346 of the revised manuscript.

Comment 15:
Line 299, it would be odd to describe years using minimum and maximum.
Response: Thank you very much for pointing out this. We will correct it in the revised manuscript.
Changes in the revised manuscript: Please see lines 344-346 of the revised manuscript.

Comment 16:
Line 300-302, the periods were already explained in the previous sections.
Response: Thank you very much for pointing out this. We will remove the duplicate sentences.
Changes in the revised manuscript: Please see line 349 of the revised manuscript.

Comment 17:
Line 304 and 311, is the building of military cities actually related to urban development?
Response: We thank the reviewer for the comment. Yes, it is. By querying the CCWAD, we can see that the newly added cities at the end of the 14th century were mainly military cities (their type were 'Wei' and 'Suo'). These military cities were distributed along the Great Wall, the southeast coast and the southwest regions that were unstable in the early Ming Dynasty. The abandoned cities in the mid-17th century were also mainly military cities. So the building of military cities was actually related to urban development.

Comment 18:
Line 324-325, the regions have long development but the city walls did not expand. Does it mean the city wall lagged behind while the urban experienced development?