MapQA: Open-domain Geospatial Question Answering on Map Data

Zekun Li, Malcolm Grossman, Ehsan Qasemi, Mihir Kulkarni, Muhao Chen, Yao-Yi ChiangarXiv 2025 · DOI

TL;DR

This paper introduces MAPQA, a novel, large-scale dataset for open-domain geospatial question answering that incorporates actual map geometries, addressing a key limitation of existing text-only benchmarks. They evaluate retrieval-based models and large language models (LLMs) for text-to-SQL generation, finding that LLMs excel at simpler queries but struggle with multi-hop geospatial reasoning.

What Problem Does This Paper Address?

Geospatial question answering (QA) is crucial for applications like navigation and finding points of interest. However, existing QA datasets often rely solely on textual descriptions of locations and features, neglecting their actual geometric shapes and spatial relationships. This limits the ability of QA systems to perform complex reasoning, such as understanding proximity, direction, and containment, which are fundamental to how we interact with maps. The authors aim to bridge this gap by creating a more comprehensive benchmark that includes geometric data and diverse geospatial reasoning tasks.

Methods

The paper proposes two main approaches for tackling geospatial QA:

  1. Retrieval-based Language Models: These models use embeddings to measure the similarity between a question and candidate geo-entities. They explore variations of Dense Passage Retrieval (DPR), including one that incorporates geospatially grounded language models (GeoLM) to better leverage spatial information.
  2. Large Language Models (LLMs) for Text-to-SQL: This approach uses LLMs (like GPT, Gemini, LLaMA) to translate natural language questions into SQL queries. These queries are then executed against an OpenStreetMap (OSM) database to retrieve answers. This method requires the LLM to understand the database schema and geospatial functions (e.g., PostGIS).

Datasets

The primary contribution is the MAPQA dataset, which consists of 3,154 question-answer pairs derived from OpenStreetMap (OSM) data for two regions: Southern California and Illinois. MAPQA features nine question types that require various forms of geospatial reasoning, including attribute association, spatial/directional proximity, and distance calculation. The dataset aims to be more diverse and larger-scaled than previous geospatial QA benchmarks like GeoQuestions201 and GeoQuestions1089. The Southern California data is split into training and testing sets, while Illinois is used for zero-shot evaluation.

Key Insights and Ideas

  • Geometry Matters: Incorporating actual map geometries is essential for robust geospatial QA, as text-only descriptions can be ambiguous and miss crucial spatial nuances.
  • LLMs for SQL are Promising, but Limited: LLMs show strong capabilities in generating SQL queries for simple, one-hop geospatial questions. However, they struggle with more complex, multi-hop reasoning tasks, which is a significant bottleneck.
  • Retrieval Models Excel at Spatial Concepts: Retrieval-based methods are effective at capturing concepts like "closeness" and "direction" but falter when precise numerical distance calculations are required, as they are inherently designed for discrete selection.
  • Generalization is Possible: Geospatial models trained on one region can generalize to unseen regions, suggesting that learned spatial reasoning can transfer.

Key Results

  • Retrieval Models: DPR-GeoLM generally outperformed DPR-BERT across most question types, particularly those involving distance. For Type 4 questions (amenity availability), both models achieved high accuracy (e.g., 87.50% R@50 for DPR-BERT). However, Type 1 questions (adjacency) remained challenging for both. In zero-shot evaluation on Illinois, performance remained relatively stable, indicating good generalization.
  • Text-to-SQL LLMs:
    • Type 4 questions (amenity availability) saw near-perfect accuracy (100%) from Gemini, GPT-3.5, and GPT-40.
  • GPT-40 showed strong performance on more complex types like Type 5 and Type 6.
  • Type 8 (intersection) and Type 9 (distance calculation) were the most challenging for all LLMs, exhibiting the highest error rates, often due to malformed SQL scripts.

Limitations and Future Work

  • Limitations:
    • Retrieval-based models struggle with precise distance calculations.
  • LLMs face challenges with multi-hop reasoning and generating correct SQL for complex spatial operations like intersections and distance calculations.
  • The current GeoLM model only supports point geometries, limiting its application to other geometry types.
  • Future Work: The authors suggest expanding geospatial relations to include topological relationships like containment, touching, and overlapping. They also aim to develop LLMs that can better handle multi-hop reasoning and more complex spatial queries.

Summary updated

BibTeX
@misc{li2025mapqa,
  author = {Zekun Li and Malcolm Grossman and Ehsan Qasemi and Mihir Kulkarni and Muhao Chen and Yao-Yi Chiang},
  title = {{MapQA: Open-domain Geospatial Question Answering on Map Data}},
  year = {2025},
  eprint = {2503.07871},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.07871},
}
Figure