Chain-of-programming (CoP): empowering large language models for geospatial code generation task

Large Language Models (LLMs) have driven the development of geospatial code generation but face challenges such as incomplete user requirements and insufficient knowledge of platform-specific syntax, often leading to ‘code hallucination.’ To address this issue, this paper proposes the Chain-of-Programming (CoP) framework, which divides the generation process into five steps: requirement analysis, algorithm design, code implementation, debugging, and annotation. The framework incorporates a shared information pool, knowledge base retrieval, and user feedback mechanisms, enabling end-to-end code generation without the need for model fine-tuning. Based on geospatial problem classification and evaluation benchmarks, CoP significantly improves the logical clarity, syntactical correctness, and executability of the generated code, achieving performance improvements ranging from 3.0% to 48.8%. Comparative and ablation experiments further validate the advantages of CoP and the necessity of its core components. Case studies on building visualization and fire data analysis demonstrate the practical value of the framework. This study also develops and open-sources a prototype system, offering a systematic, step-by-step solution for LLM-based geospatial code generation and providing valuable insights for code generation in other specialized domains.

Authors

Institutions

Publication Details

Journal
International Journal of Digital Earth
Published
2025-05-27
DOI
https://doi.org/10.1080/17538947.2025.2509812
Citations
15
Primary Topic
Service-Oriented Architecture and Web Services
Type
article
Field-Weighted Citation Impact
48.69

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Chain-of-programming (CoP): empowering large language models for geospatial code generation task

Huayi Wu, Jianyuan Liang, Jianxun Wang, X. Zhang et al.
15 citations
International Journal of Digital Earth
Service-Oriented Architecture and Web Services
48.69
article

Chain-of-programming (CoP): empowering large language models for geospatial code generation task

Huayi Wu, Jianyuan Liang, Jianxun Wang, X. Zhang, Zhangxiao Shen, Shuyang Hou, Anqi Zhao, Haoyue Jiao
article en
15 citations

Abstract

Large Language Models (LLMs) have driven the development of geospatial code generation but face challenges such as incomplete user requirements and insufficient knowledge of platform-specific syntax, often leading to ‘code hallucination.’ To address this issue, this paper proposes the Chain-of-Programming (CoP) framework, which divides the generation process into five steps: requirement analysis, algorithm design, code implementation, debugging, and annotation. The framework incorporates a shared information pool, knowledge base retrieval, and user feedback mechanisms, enabling end-to-end code generation without the need for model fine-tuning. Based on geospatial problem classification and evaluation benchmarks, CoP significantly improves the logical clarity, syntactical correctness, and executability of the generated code, achieving performance improvements ranging from 3.0% to 48.8%. Comparative and ablation experiments further validate the advantages of CoP and the necessity of its core components. Case studies on building visualization and fire data analysis demonstrate the practical value of the framework. This study also develops and open-sources a prototype system, offering a systematic, step-by-step solution for LLM-based geospatial code generation and providing valuable insights for code generation in other specialized domains.

International Journal of Digital EarthVol. 18(1)
Wuhan University (CN), State Key Laboratory of Information Engineering in Surveying Mapping and Remote Sensing (CN)
National Natural Science Foundation of China
Openalex Percentile: Top 0%
Service-Oriented Architecture and Web Services
48.69
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.