Semantic Spatial Search with Natural Language: Integrating NL2SQL with PostGIS & pgVector
11-20, 15:50–15:55 (Pacific/Auckland), WG403

We propose a semantic spatial search architecture that understands users’ natural language requests and precisely retrieves optimal locations from PostGIS and pgVector using NL2SQL.


A Semantic Spatial Search Architecture Based on Natural Language: Integrating NL2SQL with PostGIS and pgVector

Traditional location searches have relied on explicit keywords or structured database queries, such as “Auckland Sky Tower.”

However, with the widespread adoption of LLMs, users increasingly expect to explore places using ambiguous and abstract expressions, like “the tallest building nearby” or “a cafe with a great view.”

To overcome the limitations of these conventional search methods, we propose an architecture capable of directly understanding users’ natural language and performing semantic spatial search.

This architecture is designed around an AI agent that autonomously interprets and executes tasks.

The AI agent first utilizes natural language processing (NLP) techniques to analyze abstract user requirements—such as “cozy atmosphere” or “cost-effective”—and identifies their core intentions.

Based on these intentions, it employs NL2SQL techniques to directly query spatial and vector data stored in PostGIS and pgVector, enabling precise retrieval of relevant objects.

Furthermore, the AI agent leverages the MCP (Model Context Protocol) to safely and efficiently access a wide range of external data sources, such as map data, user reviews, and real-time information.

Through the organic integration of these components, the proposed architecture goes beyond simple information retrieval—performing multi-step reasoning on user intent and delivering high-level semantic spatial search that recommends the optimal location.


This work is supported by the Korea Agency for Infrastructure Technology Advancement(KAIA) grant funded by the Ministry of Land, Infrastructure and Transport (Grant RS-2022-00143336, NTIS Grant: 2610000396)

Hanjin Lee is a GIS Developer at the Gaia3D Inc. He has been working on application development and education using open source GIS for many years. Worked in data processing, visualization, and communicating information intuitively. More recently, he's been interested in GeoAI and hopes to use it to develop applications that capitalize on emerging technology trends.

This speaker also appears in: