5 Spatial Data Structures And Indexing

Geographical Information System · Unit 5

Spatial Data Structures and Indexing

Exam-focused notes for Spatial Data Structures and Indexing (Geographical Information System, BIT355): what the TU syllabus asks and how it has actually been tested, with 4 solved past questions from this unit.

Spatial Data Structures and Indexing in short

Spatial data needs structure so that a computer can answer location questions quickly. Topology records how features connect, and a spatial index finds features without scanning the whole database.

Spatial Data Structures and Indexing: notes

Topology definition

Topology is the set of spatial relationships between features that do not change when the map is stretched or bent. It records how features connect and touch, not their exact coordinates.

A topological vector model uses nodes (start and end points of lines), arcs (lines between nodes) and polygons (areas bounded by arcs). Three relationships are stored:

  • Connectivity: which arcs meet at a node.
  • Adjacency: which polygons share a boundary. Each arc stores the polygon on its left and its right.
  • Containment: which features lie inside another, such as an island inside a lake.

Example arc table:

ArcFrom nodeTo nodeLeft polygonRight polygon
A1N1N2P1Outside
A2N2N3P2P1

From this table we can see that A1 and A2 meet at N2, and that P1 and P2 are neighbours.

Importance of topology in GIS

  • Error checking: finds gaps, overlaps, dangling lines and unclosed polygons.
  • Data quality: keeps shared boundaries identical, so there is one copy of each border.
  • Spatial analysis: supports network analysis, such as the shortest path, because connectivity is known.
  • Neighbour queries: answers "which parcels touch this one?" without calculating geometry.
  • Less storage: shared boundaries are stored once.
  • Editing rules: a change to a shared border updates both polygons.

The cost is that topology takes time to build and must be rebuilt after edits.

What this unit covers

  • Topology definition
  • Importance of topology in GIS
  • Spatial indexing methods
  • Quadtree spatial indexing
  • Spatial index coding

Quadtree spatial indexing

2080 · 5 marks

Refer to the following figure, draw a quadtree, and code the spatial index of the shaded (spatial) feature. [5]

The question refers to "the following figure" showing a grid with a shaded (spatial) feature, and asks to: 1. Draw the quadtree. 2. Code the spatial index of the shaded feature. Missing data: The actual figure (the grid dimensions and the exact cells that are shaded) is NOT provided in the questi...

Open this answer on its own page →

0 · 5 marks

Refer to the following figure, draw a quadtree, and code the spatial index of the shaded (spatial) feature. [5]

Numeric / structural inputs available from the question: - Task: draw a quadtree and code the spatial index of a shaded (spatial) feature. - A figure is referenced ("Refer to the following figure"). Missing data: - The actual figure showing the grid dimensions and the specific shaded cells is NOT...

Open this answer on its own page →

Topology definition

2080 · 5 marks

What is Topology? Explain the importance of topology in GIS. [5]

Show solved answer

Model Answer: Topology in GIS

What is Topology?

Topology is the study of spatial relationships and connectivity between geographic features in a GIS database, independent of their exact geometric coordinates. It defines how features are connected, adjacent, or related to one another in space.

In GIS, topology refers to the rules and relationships that govern how points, lines, and polygons interact and connect. It answers questions such as:

  • Which features are adjacent?
  • Which features are connected?
  • Which features overlap or intersect?
  • What is the containment relationship between features?

Importance of Topology in GIS

1. Data Integrity and Quality Control

  • Topology rules enforce consistency in spatial data
  • Prevents invalid geometries (e.g., overlapping polygons, gaps between features)
  • Identifies and flags errors during data entry and editing

2. Efficient Data Storage

  • Eliminates data redundancy by storing shared boundaries only once
  • Reduces file size and storage requirements
  • Improves database performance

3. Spatial Analysis and Queries

  • Enables efficient network analysis (routing, connectivity)
  • Supports adjacency and containment queries
  • Facilitates overlay operations and spatial relationships

4. Accurate Spatial Relationships

  • Maintains logical consistency between features
  • Ensures that adjacent polygons share common boundaries
  • Prevents gaps and overlaps in polygon coverage

5. Improved Data Maintenance

  • Simplifies editing and updating of geographic features
  • When one feature is modified, related features can be automatically updated
  • Reduces manual correction efforts

6. Better Cartographic Output

  • Ensures clean, professional map production
  • Prevents visual artifacts and inconsistencies in maps

Topology is therefore fundamental to maintaining reliable, consistent, and efficient GIS databases.

Open this answer on its own page →

0 · 5 marks

What is Topology? Explain the importance of topology in GIS. [5]

Show solved answer

Model Answer: Topology in GIS

What is Topology?

Topology is the study of spatial relationships and connectivity between geographic features in a GIS database, independent of their exact geometric coordinates. It defines how features (points, lines, and polygons) are connected, adjacent, or related to one another in space.

In GIS, topology establishes rules about:

  • Connectivity: which features connect to which
  • Adjacency: which features are next to each other
  • Containment: which features are inside others
  • Overlap relationships: how features share space

Importance of Topology in GIS

1. Data Quality and Integrity

Topology enforces rules that prevent errors such as:

  • Dangling lines (lines that don't connect properly)
  • Overlapping polygons
  • Gaps between adjacent features
  • Duplicate features

2. Efficient Spatial Analysis

  • Enables faster queries by using connectivity relationships rather than recalculating distances
  • Supports network analysis (routing, flow analysis)
  • Facilitates adjacency analysis and boundary operations

3. Data Validation

  • Automatically detects and reports topological errors
  • Ensures consistency across the entire dataset
  • Maintains referential integrity between related features

4. Improved Spatial Operations

  • Enables accurate overlay operations (union, intersection, difference)
  • Supports proper polygon-to-polygon and line-to-polygon relationships
  • Ensures correct results in buffer and proximity analysis

5. Reduced Data Redundancy

  • Avoids storing duplicate coordinate information for shared boundaries
  • Reduces storage requirements
  • Improves data maintenance efficiency

6. Network and Connectivity Analysis

  • Essential for modeling utilities (water, electricity, roads)
  • Enables tracing and flow analysis
  • Supports shortest path and routing problems

Conclusion: Topology is fundamental to maintaining data quality, enabling efficient analysis, and ensuring the reliability of GIS operations.

Open this answer on its own page →