arrow
Return

CGD-QCSF: A Code Generation-Driven Query–Computation Separation Framework for Natural language Geospatial Analysis

delete2026-08-16
delete0
delete
OA
AI
Z
Zhiyuan Le
H
Hao Li *
Y
Yuanxun Mei
M
Miaomiao Ren
H
Haizhen Chen
Y
Yinying Zhou
L
Lu Li
DOI:10.3390/ijgi15080370delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
Geospatial data provide an important basis for urban governance, resource management, disaster assessment, and public health analysis by linking spatial locations, attribute information, and dynamic processes. However, complex geospatial analysis still requires substantial expertise in spatial databases, spatial SQL, and GIS computation tools. Although large language model-based Text-to-SQL methods have lowered the barrier to natural language-driven data querying, most existing approaches rely on single-step SQL generation and remain unstable for spatial tasks that involve attribute retrieval, spatial relationship evaluation, geometric operations, and statistical aggregation. To address this limitation, this paper proposes a Code Generation-Driven Query–Computation Separation Framework (CGD-QCSF). The framework is based on the separation of query and computation, and decomposes complex geospatial analysis into a staged execution process. CGD-QCSF coordinates intent understanding, schema pre-filtering, planning, execution state management, SQL generation, and spatiotemporal computation. A structured planner and an execution state manager coordinate task decomposition, capability-aware routing, and evidence-based recovery. A SQL Code Generation Agent (SCGA) handles database access, attribute filtering, and intermediate data extraction, while a Spatiotemporal Computation Agent (STCA) performs out-of-database spatial computation and statistical aggregation in an isolated Python sandbox. We construct a benchmark of 200 tasks, covering easy, medium, and hard spatial tasks. In the main experiment with Qwen3.7-Plus as the foundation model, CGD-QCSF achieves a Strict Structured Accuracy (SSA) of 90.5%. Removing the Planner reduces SSA to 84.5%, while removing the STCA reduces it to 70.5%. The ablation experiments show that removing either the Python sandbox or the Planner Agent degrades performance on complex tasks. These results indicate that CGD-QCSF extends complex geospatial analysis from single-step SQL generation into a multi-staged execution process. By explicitly separating query and computation, the framework reduces interference between spatial computation logic and database schema information, thereby improving the stability and success rate of natural language-driven geospatial analysis.
Keywords:
multi-agent systems
large language models
code generation
geospatial computation
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

I
ISPRS International Journal of Geo-Information
IF:
2.8
Papers:
608
Citations:
0

Organization

N
ningbo alatu digital technology co., ltd.
Scholars:
3
Papers: 1
Citations: 0
W
wuhan university
Scholars:
8.1W
Papers: 5.8W
Citations: 70
researcher View more organizations
Cited Papers

Cited Papers

No cited papers available