The Satellite Imagery Source

Search Image Hunter Now
Posted on June 3rd, 2014

G-FAQ – What is Spatial Topology in GIS? Part I

Sometimes one Geospatial Frequently Asked Question (G-FAQ) leads me directly into my next topic, and that is the case this month. While doing research for the four part series on ‘What is GIS?’, I realized that I had a gap in my GIS knowledge on topology. There is not a day that goes by where I am not learning something new and this G-FAQ is no different. So without further ado, let’s jump into an exploration of spatial topology in the world of GIS.

This two-part G-FAQ on spatial topology will focus on three core questions:

What is spatial topology, why is it important and how is it maintained in GIS? What are example files types that are topological in Esri’s ArcGIS? Do shapefiles have topology?

Before we jump head long into this discussion on spatial topology, let me start with a high-level definition. Topology is the science and mathematics of spatial relationships of vectors in GIS. There are four basic spatial relationships that can be maintained with vector features, I will elaborate on these shortly: adjacency, connectivity, containment and coincidence. These spatial relationships are recorded in topological vector models with the assumption of a two-dimensional world (i.e. all of the features are on the same plane). Keep in mind that raster files do not have topology – for a detailed handling of vector versus raster file types, please refer to the April 2014 G-FAQ edition.

As a quick side note, similar to the last few G-FAQ’s, this edition will also focus on Esri’s ArcGIS with regards to topology – though I do assume (perhaps incorrectly!) that these relationships are maintained likewise in all GIS software.

Arc-Node Data Structure

No single image can illustrate all of the possible arc-node relationships and then the lists that are created for each type of vector – but what you see here is the closest I could find. Also keep in mind that there are different theoretical constructs for describing arc-node data structures, I choose the version that made the most sense. At the top of the graphic are points and then the subsequent list made for these vectors. Below this are lines and their related lists – I have added a direction arrow to the original graphic to illustrate arc directionality. Also keep in mind that where there are “…” in the Left Poly column, this equates to the universe polygon mentioned here. At the bottom is a polygon and then one of the two lists mentioned here (i.e. the polygon-arc list). (Image Credit: Hunter College)

Spatial topology in ArcGIS is predicated on the vector arc-node data structure. As was mentioned in the April 2014 G-FAQ, there are three basic types of vectors, i.e. points, lines (or arcs) and polygons. Here are the basic rules of the arc-node data structure:

  1. All arcs are comprised of nodes with 0 to more vertices in between.
  2. A node is at the start and end of each arc. As there is a start and end to arcs, they have a direction in which they are created.
  3. Vertices between nodes define the shape of arcs. You can think of vertices as points along the curve of an arc.
  4. Arcs can be connected and if they are, they share a common node.
  5. Connecting arcs in a close geometric shape creates polygons.
  6. When arcs are connected to make a polygon, it actually defines two polygons. The first is often called the ‘universe polygon,’ which is all of the space outside the defined shape. The second is the area contained within the connected arcs.

Each of the arc-node relationships defined above are stored in lists. For points, the list contains an identifying number and its X and Y position (or coordinate).

For lines, the list contains an arc number, the start and end node numbers and thus the direction of the arc (i.e. clockwise or counter-clockwise) is inferred here. There is also an arc-coordinate list that contains the arc number and the associated X and Y coordinates.

For a polygon, there are also two lists. The first is the polygon-arc list which contains an identifying polygon number and then the arc numbers that comprise it. The second is the left-right list which contains the arc number and then the identifying number of the polygons to the left and right of the arc.

The Types of Spatial Topology and the Files That Maintain It

As has been discussed in previous G-FAQ editions, there are four basic types of spatial topology that can be maintained:

  1. Adjacency – which vector features are next to each other?
  2. Connectivity – which arcs connect to each other?
  3. Containment – which vector features are within other polygons?
  4. Coincidence – which vector features occupy the same space?
Admittedly the four types of spatial topology listed here have been extremely simplified and lumped together for the benefit of our readers. If you want to see all of the spatial relationships possible in ArcGIS, get ready for your mind to spin a bit. Here is an extensive look at all of the topological rules you can implement in geodatabases between points, lines and polygon vectors. (Image Credit: Esri)

In ArcGIS, there are two key file types that maintain topology, ArcINFO coverage files and geodatabases. The reason I say key file types here is to allow some wiggle room as admittedly there may be other file types with topology but I was unable to uncover any in my research. If our readers know of additional file types with explicit spatial topology, please leave a comment below so the rest of us can learn even more!

ArcINFO coverage files are rarely used today, well at least in the GIS work that I have done. They can be thought of as the original Esri shapefiles. By definition, a coverage file is topological as a topology table is created and maintained as the file is modified and expanded upon. Coverages are a collection of various files, the topology table is one of them, and they have a complex structure as you see in the case of a geodatabase. A coverage can contain point, line and polygon features in a single file. Often times, you will see coverages grouped into a single file with the extension .e00 – these are called ArcINFO Export files and need to be extracted first before they can be read by ArcGIS. One tool you can use to extract ArcINFO Export files is offered for free from Esri here, it is called Import71.

Geodatabases are by far the more popular file format that can maintain topological relationships; and I say they can maintain topology as it is possible to create a geodatabase without these rules embedded. A geodatabase can also contain point, line and polygon layers which are called features. In order to embed topology in a geodatabase, it is necessary to define classes of features and the rules that relate them to each other. Topology can be maintained between points, line and polygons. Once these rules are validated, the set of features will be related through topological relationships that are maintained even when you edit. It is possible to create exceptions to these topological rules so they can be violated in specific instances but then maintained across the broad set of related features.

There are two key differences with regards to spatial topology of ArcINFO coverage files and geodatabases. First, in coverage files, there is a specific table defining all the topological relationships between the features that is created and changed as the file is edited. And for a geodatabase, there is not a specific table but rather a set of rules that are stored to maintain topology. Second, with a geodatabase it is possible to edit a set of feature classes that share a common geometry, while in coverage files each vector layer must be edited independently. So for example take two polygon layers representing parcels and easements in a city where they share a common geometry (or boundaries). When the parcel layer is edited in a geodatabase, so is the easement layer; while in a coverage file, it would be necessary to edit both layers independently.

By now, I am sure our readers’ heads are full of fun information on arc-node data structures and spatial topology, so for now, let’s call a close to this two-part G-FAQ. In the next edition, we will pick up this discussion, looking at why spatial topology is (or perhaps was…) important and at the ‘topology’ of shapefiles.

Do you have an idea for a future G-FAQ? If so, let me know by email at

Find Out More About This Topic Here

  • Esri – ArcGIS: Working with Geodatabase Topology
  • Oberlin College – Understanding Topology
  • Saint Louis University – How to Create and Edit Topology
  • State University of New York – Data Structures
  • University of Eastern Michigan – Fundamentals of GIS Data
  • University of Massachusetts – Topology Slides
  • University of Nebraska, Omaha – Structuring Maps
  • University of North Texas – GeoDatabase Topology
  • University of Texas – Vector Data Model
  • University of Washington – Spatial Data Model

Brock Adam McCarty
Map Wizard
(720) 470-7988

This entry was posted in The Geospatial Times and tagged , , , Bookmark the permalink.

2 Responses to G-FAQ – What is Spatial Topology in GIS? Part I

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

    The Geospatial Times Archive