With the evolution of modern city,architectural heritage occupies an important position in the protection of traditional culture in my country,especially ancient buildings in the Ming and Qing dynasties,which are at the last peak in the history of ancient architecture.The buildings have attracted the attention of scholars in various fields.The digital management and application of ancient building models are an important part of the current protection work,but the current 3D ancient building models still have problems such as unclear semantic expression,lack of spatial topological relationship,and poor model visualization effect,which make the existing models unable to meet the semantic query,spatial analysis,data mining and other deep application requirements in the field of ancient building protection.City GML(City Geography Markup Language,referred to as City GML)is a general data model for 3D cities.It defines the geometry,semantics,topology,appearance and other attribute information of most physical objects in the city,and regulates multi-scale model division standard,and also provides application domain extension mechanism ADE(Application Domain Extension,ADE for short)to meet application requirements in other fields.Therefore,it is of great significance to apply City GML to the field of architectural heritage to construct a 3D model of ancient buildings that integrates geometry,semantics and topology,and to realize digital protection and refined management of ancient building models.This paper focuses on the ancient buildings of the Ming and Qing dynasties,and constructs a City GML extension model considering semantics and topology through the application domain extension mechanism,so as to realize the integration of City GML and the field of architectural heritage protection.The main research contents of the article are as follows:(1)According to the structural characteristics of ancient buildings in Ming and Qing dynasties,the semantic categories of ancient building components are expanded and defined,and the semantic module of the City GML ancient building extension model is designed.Firstly,the architectural components of ancient buildings in Ming and Qing dynasties are classified into categories according to the spatial structure,and then the attribute information such as geometric expression,semantic description,LOD(Levels of Detail,LOD)and other attribute information of the component categories are defined,and finally City GML is designed according to these information.The ancient building semantic extension module standard modeling language(Unified Modeling Language,referred to as UML)diagram,and write the corresponding semantic information definition file(XML Schemas Definition,referred to as XSD).(2)On the basis of the original and topological expression Xlink,four new topological relation and topological element classes are added to describe the topological relation and topological intersection between the two component semantic entities,and the topology module of the City GML extended model is designed.Aiming at the problem that the original topology expression method of City GML is not clear,this paper takes the spatial topology model as the theoretical basis,and proposes four topological relations: connection,separation,equality,inclusion and four topological elements: point,line,surface,and volume to represent two detailed topological relationships between ancient building components.Among them,the topology element represents the intersection element generated by two entities,and the geometric representation of the intersection element uses the original simple Xlink reference method.In this way,the new topology expression can not only inherit the simplicity of the original topology expression,reduce the redundancy of the model,but also clearly and clearly express the topology relationship between semantic objects.Finally,design the topology module UML diagram of the City GML extension model according to the newly added topology class,and convert it into a topology relation XSD definition file.(3)Using the forbidden city population in Beijing as experimental data,the usability of the semantic and topological expansion model proposed above is verified.Firstly,data preprocessing is performed on the Sketch Up 3D model of the forbidden city group,and the model components are divided into categories to provide original geometric data for subsequent modeling;then the semantic information and topological relationship definition files(*.XSD)are converted by the ade-xjc tool.Convert it into a Java class library,and then use citygml4 j technology to build a 3D model of City GML ancient buildings containing semantic and topological information based on this class library and Sketch Up geometric data;finally,the model is visualized and topologically analyzed.The experimental results show that the City GML extension model proposed in this paper considering semantics and topology can be practically applied to ancient buildings in Ming and Qing dynasties.The constructed ancient building model can clearly and intuitively express the semantic information and topological relationship of ancient building components.It shows great visualization effects in terms of rendering and multi-scale expression. |