Querying by sketch geographical databases

Han Yu2016

Introduction

As Geographic Information Systems (GIS) grow in scale and complexity, the methods used to query them have become a significant bottleneck. Traditional text-based languages often struggle with the inherent ambiguity of spatial terms like "near" or "partially overlapping," while icon-based interfaces lack the flexibility to represent the infinite variety of real-world spatial configurations. This paper proposes a "Spatial-Query-by-Sketch" system, designed to be as intuitive as a hand-drawn napkin sketch while maintaining the mathematical rigor required for database management systems.

Methodology

The proposed system follows a three-stage pipeline: sketching (user input), parsing (extracting relations), and execution (searching the database). The parsing stage is critical, as it translates visual input into a structured spatial signature using two primary models.

Topological and Directional Modeling

To capture the essence of a sketch, the system first employs the 9-intersection model to define topological relations (e.g., "contains," "meets," or "overlaps") based on the intersections of interiors, boundaries, and exteriors.

Complementing this is the Deep Direction-Relation Matrix. This model partitions the space surrounding a reference object into nine distinct tiles (North, South, East, West, and their diagonals). By recording which tiles are occupied by other objects, the system creates a robust directional profile that can handle points, lines, and polygons.

The Deep Direction-Relation Matrix partitions space around a reference object A to define the relative position of object B.

Efficient Search via Voronoi Optimization

The query is framed as a Binary Constraint Satisfaction Problem (CSP). While standard CSP algorithms often face exponential complexity ($O(K^N)$), this paper introduces a significant optimization using Voronoi diagrams. By defining "1-order neighborhood relations," the search algorithm only evaluates immediate neighbors in the database. This approach drastically prunes the search space, ensuring practical query times even for large datasets.

Key Insights: Hybrid Modeling and Distillation

A central finding of this research is that neither topology nor direction alone is sufficient for accurate spatial querying; a hybrid approach provides a "complete" signature. Furthermore, the paper demonstrates the power of Sketch Distillation—the process of converting a messy human drawing into a clean, relational table.

A relational table distilling topological connections between multiple sketched objects.

This distillation acts as the bridge between human intent and machine execution, allowing the system to match the user's conceptual model against the stored spatial data with high accuracy.

Results and Performance

In experimental evaluations using a database of 1,700 spatial scenes, the algorithm achieved 100% precision and recall. The system successfully identified all relevant configurations without returning false positives. While the complexity of the sketch (the number of objects) impacts performance, the Voronoi-based pruning keeps the system viable for real-world GIS applications.

Conclusion and Future Directions

The "Query-by-Sketch" approach offers a promising path toward more accessible GIS interfaces. Future work will focus on improving scalability for massive datasets and incorporating "fuzzy" matching to account for qualitative descriptions (e.g., "roughly circular") and shape similarities, further narrowing the gap between human intuition and spatial logic.

Summary updated

BibTeX
@misc{yu2016querying,
  author = {Han Yu},
  title = {{Querying by sketch geographical databases}},
  year = {2016},
  doi = {10.2991/icsmim-15.2016.59},
}
Figure