
Geospatial topology is the study and application of qualitativespatial relationships betweengeographic features, or between representations of such features ingeographic information, such as ingeographic information systems (GIS).[1] For example, the fact that two regionsoverlap or that onecontains the other are examples of topological relationships. It is thus the application of the mathematics oftopology to GIS, and is distinct from, but complementary to the many aspects of geographic information that are based on quantitative spatial measurements throughcoordinate geometry. Topology appears in many aspects ofgeographic information science and GIS practice, including the discovery of inherent relationships throughspatial query,vector overlay andmap algebra; the enforcement of expected relationships as validation rules stored in geospatial data; and the use of stored topological relationships in applications such asnetwork analysis.[2][3][4]Spatial topology is the generalization of geospatial topology for non-geographic domains, e.g.,CAD software.
In keeping with the definition oftopology, atopological relationship between two geographic phenomena is any spatial relation that is not sensitive to measurable aspects of space, including transformations of space (e.g.map projection). Thus, it includes most qualitative spatial relations, such as two features being "adjacent," "overlapping," "disjoint," or one being "within" another; conversely, one feature being "5km from" another, or one feature being "due north of" another aremetric relations. One of the first developments ofGeographic Information Science in the early 1990s was the work of Max Egenhofer, Eliseo Clementini, Peter di Felice, and others to develop a concise theory of such relations commonly called the9-Intersection Model, which characterizes the range of topological relationships based on the relationships between the interiors, exteriors, and boundaries of features.[5][6][7][8]
These relationships can also be classified semantically:

Topology was a very early concern for GIS. The earliest vector systems, such as theCanadian Geographic Information System, did not manage topological relationships, and problems such assliver polygons proliferated, especially in operations such asvector overlay.[9] In response, topologicalvector data models were developed, such asGBF/DIME (U.S. Census Bureau, 1967) and POLYVRT (Harvard University, 1976).[10] The strategy of the topological data model is to store topological relationships (primarily adjacency) between features, and use that information to construct more complex features. Nodes (points) are created where lines intersect and are attributed with a list of the connecting lines. Polygons are constructed from any sequence of lines that forms a closed loop. These structures had three advantages over non-topological vector data (often called "spaghetti data"): First, they were efficient (a crucial factor given the storage and processing capacities of the 1970s), because the shared boundary between two adjacent polygons was only stored once; second, they facilitated the enforcement of data integrity by preventing or highlightingtopological errors, such as overlapping polygons, dangling nodes (a line not properly connected to other lines), andsliver polygons (small spurious polygons created where two lines should match but do not); and third, they made the algorithms for operations such asvector overlay simpler.[11] Their primary disadvantage was their complexity, being difficult for many users to understand and requiring extra care during data entry. These became the dominant vector data model of the 1980s.
By the 1990s, the combination of cheaper storage and new users who were not concerned with topology led to a resurgence in spaghetti data structures, such as theshapefile. However, the need for stored topological relationships and integrity enforcement still exists. A common approach in current data is to store such as an extended layer on top of data that is not inherently topological. For example, the Esrigeodatabase stores vector data ("feature classes") as spaghetti data, but can build a "network dataset" structure of connections on top of a line feature class. The geodatabase can also store a list of topological rules, constraints on topological relationships within and between layers (e.g., counties cannot have gaps, state boundaries must coincide with county boundaries, counties must collectively cover states) that can be validated and corrected.[12] Other systems, such asPostGIS, take a similar approach. A very different approach is to not store topological information in the data at all, but to construct it dynamically, usually during the editing process, to highlight and correct possible errors; this is a feature ofGIS software such asArcGIS Pro andQGIS.[13]
Several spatial analysis tools are ultimately based on the discovery of topological relationships between features:
Oracle andPostGIS provide fundamental topological operators allowing applications to test for"such relationships as contains, inside, covers, covered by, touch, and overlap with boundaries intersecting."[14][15] Unlike the PostGIS documentation, the Oracle documentation draws a distinction between"topological relationships [which] remain constant when the coordinate space is deformed, such as by twisting or stretching" and"relationships that are not topological [which] include length of, distance between, and area of." These operators are leveraged by applications to ensure that data sets are stored and processed in a topologically correct fashion. However, topological operators are inherently complex and their implementation requires care to be taken with usability and conformance to standards.[16]