Can Large Language Models Generate Geospatial Code?
Not on the map. Why?
Abstract (arXiv)
With the growing demand for spatiotemporal data processing and geospatial modeling, automating geospatial code generation has become essential for productivity. Large language models (LLMs) show promise in code generation but face challenges like domain-specific knowledge gaps and "coding hallucinations." This paper introduces GeoCode-Eval (GCE), a framework for assessing LLMs' ability to generate geospatial code across three dimensions: "Cognition and Memory," "Comprehension and Interpretation," and "Innovation and Creation," distributed across eight capability levels. We developed a benchmark dataset, GeoCode-Bench, consisting of 5,000 multiple-choice, 1,500 fill-in-the-blank, 1,500 true/false questions, and 1,000 subjective tasks covering code summarization, generation, completion, and correction. Using GeoCode-Bench, we evaluated three commercial closed-source LLMs, four open-source general-purpose LLMs, and 14 specialized code generation models. We also conducted experiments on few-shot and zero-shot learning, Chain of Thought reasoning, and multi-round majority voting to measure their impact on geospatial code generation. Additionally, we fine-tuned the Code LLaMA-7B model using Google Earth Engine-related JavaScript, creating GEECode-GPT, and evaluated it on subjective tasks. Results show that constructing pre-training and instruction datasets significantly improves code generation, offering insights for optimizing LLMs in specific domains.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). First posted on arXiv 13 Oct 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 4; 2026: 2.
6 papers.
- 2025CangLing-KnowFlow: A Unified Knowledge-and-Flow-fused Agent for Comprehensive Remote Sensing Applicationscited by 8
- 2025From PowerPoint UI Sketches to Web-Based Applications: Pattern-Driven Code Generation for GIS Dashboard Development Using Knowledge-Augmented LLMs, Context-Aware Visual Prompting, and the React Frameworkcited by 1
- 2025AutoGEEval: A Multimodal and Automated Framework for Geospatial Code Generation on GEE with Large Language Modelscited by 0
- 2025Context-Aware Visual Prompting: Automating Geospatial Web Dashboards with Large Language Models and Agent Self-Validation for Decision Supportcited by 0
- 2026GISclaw: A Comprehensive Open-Source LLM Agent System for Realistic Multi-Step Geospatial Analysiscited by 0
- 2026GeoContra: From Fluent GIS Code to Verifiable Spatial Analysis with Geography-Grounded Repaircited by 0
- 2026GeoContra: From Fluent GIS Code to Verifiable Spatial Analysis with Geography-Grounded Repair1 May 2026
- 2026GISclaw: A Comprehensive Open-Source LLM Agent System for Realistic Multi-Step Geospatial Analysis27 Mar 2026
- 2025CangLing-KnowFlow: A Unified Knowledge-and-Flow-fused Agent for Comprehensive Remote Sensing Applications17 Dec 2025
- 2025Context-Aware Visual Prompting: Automating Geospatial Web Dashboards with Large Language Models and Agent Self-Validation for Decision Support10 Oct 2025
- 2025AutoGEEval: A Multimodal and Automated Framework for Geospatial Code Generation on GEE with Large Language Models19 May 2025
- 2025From PowerPoint UI Sketches to Web-Based Applications: Pattern-Driven Code Generation for GIS Dashboard Development Using Knowledge-Augmented LLMs, Context-Aware Visual Prompting, and the React Framework12 Feb 2025
Similar, not cited
Close in wording, no citation either way
- 2024Evaluation of Code LLMs on Geospatial Code Generation
- 2024Geo-FuB: A Method for Constructing an Operator-Function Knowledge Base for Geospatial Code Generation Tasks Using Large Language Models
- 2025GeoAnalystBench: A GeoAI benchmark for assessing large language models for spatial analysis workflow and code generation
- 2024GEE-OPs: An Operator Knowledge Base for Geospatial Code Generation on the Google Earth Engine Platform Powered by Large Language Models
- 2023Are Large Language Models Geospatially Knowledgeable?
- 2024Evaluating Large Language Models on Spatial Tasks: A Multi-Task Benchmarking Study
- 2024CityGPT: Empowering Urban Spatial Cognition of Large Language Models
- 2024An LLM Agent for Automatic Geospatial Data Analysis