Effective integration and wide sharing of geospatial data is an important and basic premise to facilitate the research and applications of geographic information science. However, the semantic heterogeneity of geospatial data is a major problem that significantly hinders geospatial data integration and sharing. Ontologies are regarded as a promising way to solve semantic problems by providing a formalized representation of geographic entities and relationships between them in a manner understandable to machines. Thus, many efforts have been made to explore ontology-based geospatial data integration and sharing. However, there is a lack of a specialized ontology that would provide a unified description for geospatial data. In this paper, with a focus on the characteristics of geospatial data, we propose a unified framework for geospatial data ontology, denoted GeoDataOnt, to establish a semantic foundation for geospatial data integration and sharing. First, we provide a characteristics hierarchy of geospatial data. Next, we analyze the semantic problems for each characteristic of geospatial data. Subsequently, we propose the general framework of GeoDataOnt, targeting these problems according to the characteristics of geospatial data. GeoDataOnt is then divided into multiple modules, and we show a detailed design and implementation for each module. Key limitations and challenges of GeoDataOnt are identified, and broad applications of GeoDataOnt are discussed.