地理空间分析在城市治理、环境监测与灾害管理中发挥着关键作用,但端到端自动化仍受限于数据获取碎片化、算子耦合复杂以及工作流可复现性不足等问题。本文提出 AutoGIS,一种以契约驱动的自主式地理信息系统(GIS)智能体框架,将地理空间分析建模为受可验证契约与环境反馈约束的程序综合问题。AutoGIS 包含数据智能体与代码智能体:数据智能体依托地理空间资产知识图谱(Geospatial Asset Knowledge Graph, GAKG)与满足性门控机制,实现无需显式数据路径的数据发现、获取与处理,生成可供分析使用的数据及数据契约;代码智能体则基于上述数据契约与算法契约,条件化生成 PyQGIS 代码,并利用堆栈跟踪与运行时日志实现自修复。此外,我们提出 QGIS-GPT,采用三阶段阶梯式对齐策略,以提升对长尾算子的理解与调用能力。实验表明,AutoGIS 在多源地理空间任务中显著提升了资产检索、任务编排、算法理解、代码生成及修复鲁棒性。缓冲区分析、归一化植被指数(NDVI)变化分析与基于规则的土地利用分类等案例研究,验证了其从用户意图到完整分析的端到端能力,为更可靠的自主地理空间建模奠定了基础。
Geospatial analysis plays a critical role in urban governance, environmental monitoring, and disaster management, yet end-to-end automation remains constrained by fragmented data acquisition, complex operator coupling, and limited workflow reproducibility. We present AutoGIS, a contract-driven autonomous GIS agent framework that formulates geospatial analysis as a program synthesis problem governed by verifiable contracts and environmental feedback. AutoGIS comprises a data agent and a code agent. The data agent performs data-path-free discovery, acquisition, and processing through a Geospatial Asset Knowledge Graph (GAKG) and satisfaction gating, producing analysis-ready data and data contracts. The code agent conditions PyQGIS generation on these data contracts and algorithm contracts, and performs self-repair using stack traces and runtime logs. We further develop QGIS-GPT with a three-stage laddered alignment strategy to improve long-tail operator understanding and invocation. Experiments show that AutoGIS improves asset retrieval, task orchestration, algorithm understanding, code generation, and repair robustness across multi-source geospatial tasks. Case studies on buffer analysis, normalized difference vegetation index (NDVI) change analysis, and rule-based land-use classification demonstrate end-to-end intent-to-analysis capability, establishing a foundation for more reliable autonomous geospatial modeling.