Key points are not available for this paper at this time.
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.
Hou et al. (Fri,) studied this question.