arrow
Return

GeoCogent: an LLM-based agent for geospatial code generation

delete2025-08-22
delete0
PRE
AI
S
Shuyang Hou *
H
Haoyue Jiao *
J
Jianyuan Liang *
Z
Zhangxiao Shen
A
Anqi Zhao
H
Huayi Wu *
DOI:10.1080/13658816.2025.2549460delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Automated geospatial code generation is increasingly essential for complex spatial analysis and interdisciplinary GIS applications. However, existing large language models (LLMs) often fail to meet demands for interpretation, syntax adaptation, path retrieval, and validation, frequently producing ‘code hallucinations’—unreadable or non-functional code. To address this, we propose GeoCogent, the first intelligent framework for geospatial code generation powered by LLMs. GeoCogent integrates planning, tool-augmented reasoning, and memory mechanisms to support demand interpretation, dynamic knowledge retrieval, and consistent context maintenance, tackling core challenges in geospatial coding. We also developed and open-sourced GeoCodes, a benchmark dataset with evaluation metrics, and conducted comparative experiments, ablation studies, and case demonstrations. Results show GeoCogent achieves high efficiency across explicit, incomplete, and open-ended requirements, with each mechanism contributing significantly. Moreover, the prototype system supports local deployment and LLM integration, offering a low-barrier, efficient tool for geospatial development. By lowering technical thresholds and improving code reliability, GeoCogent advances intelligent geospatial analysis and enables interdisciplinary users to address complex analytical challenges.
Keywords:
Geospatial code generation
LLM-based agent
GIS

Journal

International Journal of Geographical Information Science cover
International Journal of Geographical Information Science
IF:
5.1
Papers:
2.7K
Citations:
9.3K

Organization

W
wuhan university
Scholars:
8.0W
Papers: 5.8W
Citations: 70