GISclaw: A Comprehensive Open-Source LLM Agent System for Realistic Multi-Step Geospatial Analysis
Organizations: Department of Civil, Architectural & Environment Engineering, Sungkyunkwan University, Suwon, South Korea · Ministry of the Interior and Safety, South Korea · School of Geography, University of Leeds, United Kingdom · Department of Fire Safety Engineering, Jeonju University, Jeonju-si, Republic of Korea
Abstract
Most LLM-driven GIS assistants solve narrow single-step tasks tightly coupled to proprietary platforms such as ArcGIS or QGIS, limiting their use for the multi-step, cross-format pipelines that define professional geospatial analysis. We present GISclaw, a comprehensive open-source agent system that performs realistic GIS analysis end to end - spatial joins, raster algebra, kriging interpolation, machine-learning classification, network analysis, choropleth cartography - directly through Python with no commercial GIS dependency. GISclaw couples an LLM reasoning core with a persistent Python sandbox pre-loaded with the open-source geospatial stack, three engineered prompt rules (Schema Analysis, Package Constraint, Domain Knowledge Injection), and an Error-Memory module for self-correction. A single backend-agnostic architecture supports both cloud-API and locally deployed open-weight LLM backends, enabling air-gapped deployment without loss of capability. On GeoAnalystBench - 50 expert-curated multi-step tasks averaging 5.8 analytical steps across vector, raster, and tabular data - GISclaw reaches up to 100% task success and 97% mean success over three independent runs. We further conduct 1,800 controlled experiments (50 tasks x 6 backends x 2 architectures x 3 repeats) with bootstrap 95% CIs, paired Wilcoxon tests, and a composite-score sensitivity analysis (Kendall's tau median = 0.94), and introduce a three-layer evaluation protocol combining code structure, reasoning process, and type-specific output verification. The Single-Agent ReAct loop reliably outperforms the Dual-Agent Plan-Execute-Replan pipeline on every cloud backend (Cliff's delta = 0.15-0.41); only the locally deployed 14B model gains from multi-agent orchestration, suggesting architectural complexity should match model capability rather than be added by default.
Figures & tables
| System | Data Types | Models | Architectures | Open-Source | Tasks | Best Success |
|---|---|---|---|---|---|---|
| LLM-Geo ( Li and Ning, 2023 ) | Vector | 1 (GPT-4) | Single | ✓ | Case study | 80% |
| GIS Copilot ( Akinboyewa et al., 2025 ) | Vector+Raster | 2 (GPT-4/3.5) | Single | ✓ | 110 | 86.4% |
| GeoGPT ( Zhang et al., 2023 ) | Vector | 1 (GPT-3.5) | Single | No | Case study | — |
| GeoJSON Agents ( Luo et al., 2026 ) | GeoJSON | Multiple | Multi (2-role) | No | 70 | 97.1% |
| GeoColab ( Wu et al., 2025 ) | Vector | 7 | Multi (3-role) | ✓ | 50 | +26.1% |
| GTChain ( Zhang et al., 2025b ) | Vector+Raster | 2 (LLaMA/GPT-4) | Single (Fine-tuned) | ✓ | Custom | +32.5% ‡ |
| Category | Libraries | Capabilities |
|---|---|---|
| Vector | GeoPandas, shapely, fiona, pyproj | Spatial joins, buffer, overlay, CRS transforms |
| Raster | rasterio, xarray, rasterstats | Band algebra, interpolation, zonal statistics |
| Analysis | scipy, scikit-learn, libpysal | Kriging, clustering, regression, spatial autocorrelation |
| Visualization | matplotlib, seaborn, geoplot, cartopy | Choropleth, heatmaps, multi-panel cartography |
| Feature | Design Rationale |
|---|---|
| State persistence | Variables and imports survive across rounds, enabling incremental exploratory analysis |
| Asymmetric truncation | stdout: front-truncated (latest results); stderr: tail-truncated (root-cause error) |
| Variable tracking | New variables logged per round, providing the agent with execution context |
| 10-min timeout | Prevents runaway computations ( e.g. , large-scale Kriging on consumer GPUs) |
| Category | Representative Task | |
|---|---|---|
| Understanding spatial distributions | 19 | T1: Urban heat island & elderly risk mapping via Kriging interpolation |
| Making predictions | 8 | T20: Mineral deposit prediction using Random Forest with raster features |
| Detecting patterns | 7 | T42: Airbnb price clustering via local Moran’s I spatial autocorrelation |
| Measuring shape & distribution | 7 | T36: Vegetation change detection using SAVI spectral index |
| Determining spatial relationships | 6 | T38: Travel-time isochrone computation on road networks |
| Optimal locations & paths | 3 | T32: Wildlife corridor optimization via weighted cost-surface overlay |
| Model | Backend | Cost ($/M) | Context |
|---|---|---|---|
| Cloud API (pay-per-use) | |||
| GPT-5.4 | OpenAI | 2.50 / 15.00 | 1M |
| GPT-4.1 | OpenAI | 2.00 / 8.00 | 1M |
| DeepSeek-V3.2 | DeepSeek | 0.28 / 0.42 | 128K |
| Gemini-3-Flash | Google AI | 0.50 / 3.00 | 1M |
| Local deployment (zero marginal cost) | |||
| Single Agent | Dual Agent | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Model | Cost | Cost | ||||||||||
| DeepSeek-V3.2 | 0.973 | 0.635 | 0.632 | 0.641 | 0.761 ( 0.023) | $0.50 | 0.893 | 0.532 | 0.585 | 0.636 | 0.681 ( 0.033) | $0.80 |
| Gemini-3-Flash | 0.967 | 0.635 | 0.662 | 0.647 | 0.765 ( 0.024) | $0.80 | 0.867 | 0.540 | 0.532 | 0.562 | 0.650 ( 0.036) | $1.50 |
| GPT-5.4 | 1.000 | 0.562 | 0.602 | 0.633 | 0.750 ( 0.016) | $8.50 | 0.967 | 0.507 | 0.538 | 0.628 | 0.705 ( 0.022) | $12.30 |
| GPT-4.1 | 0.967 | 0.601 | 0.663 | 0.604 | 0.747 ( 0.026) | $1.20 | 0.933 | 0.503 | 0.573 | 0.648 | 0.695 ( 0.027) | $3.40 |
| Llama-3.3-70B | 0.913 | 0.398 | 0.610 | 0.614 | 0.656 ( 0.029) | $0 † | 0.893 | 0.344 | 0.577 | 0.620 | 0.627 ( 0.030) | $0 † |
| Model | Median | Cliff’s | -value | ||
|---|---|---|---|---|---|
| Gemini-3-Flash | 0.7646 | 0.6501 | |||
| DeepSeek-V3.2 | 0.7612 | 0.6809 | |||
| GPT-4.1 | 0.7473 | 0.6954 | |||
| GPT-5.4 | 0.7504 | 0.7052 | |||
| Llama-3.3-70B | 0.6563 | 0.6269 | |||
| Qwen2.5-Coder-14B | 0.4537 | 0.5882 |
| Model | CodeBLEU | API F1 | ROUGE-L |
|---|---|---|---|
| Single Agent | |||
| GPT-5.4 | 0.172 | 0.602 | 0.136 |
| GPT-4.1 | 0.171 | 0.659 | 0.142 |
| Gemini Flash | 0.168 | 0.662 | 0.141 |
| Llama-70B | 0.166 | 0.606 | 0.137 |
| Qwen-14B | 0.162 | 0.504 | 0.132 |
| Model | Task | Data | Method | Self-Corr. | Result | Avg. |
|---|---|---|---|---|---|---|
| Single Agent | ||||||
| DeepSeek | 4.14 | 4.48 | 3.98 | 3.44 | 4.18 | 4.04 |
| Gemini Flash | 3.78 | 4.10 | 3.42 | 3.16 | 3.46 | 3.58 |
| GPT-5.4 | 3.28 | 3.98 | 3.14 | 3.12 | 3.12 | 3.33 |
| GPT-4.1 | 3.26 | 3.62 | 3.02 | 2.48 | 2.76 | 3.03 |
| Llama-70B | 3.04 | 3.42 | 2.52 | 2.64 | 1.86 | 2.70 |
| Condition | mean | std | successes |
|---|---|---|---|
| With workflow | |||
| Without workflow | |||
| Mean per-task (with without) ; median . | |||
| Paired Wilcoxon ; Cohen’s (medium effect). | |||
| Category | Failure Symptom | Fix Applied |
|---|---|---|
| Data Pathing | Nested SHP files cause FileNotFoundError | Flatten dataset structure |
| API State | rasterio.open() returns reader object; agent calls .astype() | Return raw ndarray + metadata dict |
| Memory | City-wide grids exceed cells; overlay OOM | Enforce grid-size templates |
| Type Coercion | String-encoded numerics fail during interpolation | Auto-cast with pd.to_numeric |