| Geographic Markup Language(GML) is an encoding specification which is established by the OpenGIS and based on XML for the geographic information. It is vendor-neutral and platforms-neutral. It provides a unified framework for the modeling, transport and storage of geographic information including both the spatial and non-spatial properties of geographic features. Its appearance offers nice solutions for the sharing and interoperation of spatial data, and meanwhile, it also breaks a new path for the development of WebGIS.Presently, GML has been the international standard for the encoding and exchange of spatial data .With the massive GML in application systems,it brings us to new issues to resolve the GML spatial data query problem.Firstly,this paper analyses the current research actuality and shortages of querying GML data international and then suggests a feature-based GML query strategy after describing in details several important data models in GML specifaciton and concluding some characteristics of GML spatial data,which namely builds all spatial queries on GML features,querying their corresponding attributes. By using object-oriented technology,regarding GML data as feature collections,Such tactics can not only solve most GML query problems,but also accommodate with the current software development trend.Secondly,in order to implement spatial query on GML data ,this article extends spatial funtions on XQuery language and presents some characteristics of XQuery when using to query GML,which establishs the groundwork of the feature-based strategy for querying GML data. In addition,this paper designs a GML parser engine through SAX technique,by adding spatial data types and gives data structures of all spatial types and their anamytical steps,and ultimately generates a GML document tree with features as its leaf nodes. The parse strategy has adopted the event-driven model,not only saving system resources when parsing massive GML data,but also easily being extended to support all other spatial types,which provids a great solution of data processing before querying GML data based on features.Finally,this thesis develops a prototype system of feature-based GML query machnism .it gives the achievable steps and class structure of the various moduls in the system,implementing to query the geometric,topologic and non spatial attributes on features and buffer analysis. All queries based on features can combine all spatial queries with non spatial ones. With the flexible structure ,the system can be easily extended to query other attritutes of features.This thesis's originality is that it has proposed a feature-based thought of GML query,extended XQuery language to implement GML spatial query,designed a GML parser engine using SAX technology. As a result it has implemented the designment and development of the feature-based GML query system.With the development of GIS,there are urgencies to sovling the problem of querying GML spatial data and inevitable trend to develop GML spatial database. The work in this paper will provide some reference in later expansion and future development of GML spatial database. |