GeoGPT: Understanding and Processing Geospatial Tasks through An Autonomous GPT

Yifan Zhang, Wei Cheng, Shangyou Wu, Zhengting He, Wenhao Yu

TL;DR

GeoGPT is a new framework that uses Large Language Models (LLMs) as autonomous agents to bridge the gap between complex Geographic Information Systems (GIS) and non-professional users. By chaining natural language reasoning with a specialized "GIS Tool Pool," the system can independently plan and execute multi-step geospatial tasks—like facility siting or satellite image analysis—based solely on simple text instructions.

What Problem Does This Paper Address?

While GIS is an essential tool for urban planning, public health, and environmental management, it remains notoriously difficult for non-experts to use. Solving a single geospatial problem often requires a "professional" sequence of operations: for example, to find a site for a new school, one might need to run a Buffer tool (to find areas near parks), an Intersect tool (to find where those buffers overlap with bus routes), and an Erase tool (to remove areas near factories).

Existing solutions like ArcGIS ModelBuilder allow professionals to pre-package these workflows, but they are static and cannot adapt to the diverse, nuanced demands of a layperson. The authors aim to lower this barrier by leveraging the semantic reasoning of LLMs to interpret natural language and autonomously "think, plan, and execute" the right sequence of GIS tools.

Methods

The researchers developed GeoGPT, a framework built on the LangChain library using GPT-3.5-turbo as the core reasoning engine. The architecture consists of three main components:

  1. The GIS Tool Pool: A collection of specialized tools categorized into Data Collection (crawlers for POIs and road networks), Data Loading, Spatial Analysis (Buffer, Intersect, Clip, Erase), Remote Sensing (RS) Image Processing (Land-use classification), and Cartography (Mapping).
  2. The ReAct Paradigm: GeoGPT follows a "Reasoning and Acting" loop. Given a query, the LLM generates a Thought (what to do next), selects an Action (which tool to call), provides the Action Input (parameters), and receives an Observation (the tool's output or an error message). It repeats this until the task is finished.
  3. Protection Mechanisms: To handle LLM "hallucinations" (like inventing file paths or tools that don't exist), the authors implemented a pre-judgment layer. This layer checks if files exist and ensures geometry dimensions are compatible (e.g., ensuring a "Clip" boundary is a polygon) before the tool executes.

Datasets

The paper does not introduce a new training dataset; instead, it demonstrates the framework's ability to interact with real-world data sources:

  • OpenStreetMap: Used for road network collection.
  • Geospatial Data Cloud: Used for downloading remote sensing images (LANDSAT, MODIS, DEM).
  • POI Data: Crawled for Chinese cities (restaurants, hotels, etc.).
  • Local Case Study Data: Specific datasets for Wuhan, China, including subway stations, factories, and land-use data, were used to validate spatial queries and facility siting tasks.

Key Insights and Ideas

  • "Foundational plus Professional": The core philosophy is that LLMs shouldn't perform precise spatial calculations themselves (where they often fail). Instead, they should act as the "brain" or controller that calls mature, deterministic GIS algorithms to do the heavy lifting.
  • Semantic Alignment is Crucial: The authors found that LLMs can get confused by words with multiple meanings. For instance, "clip" in general language might mean "remove," but in GIS, it means "keep only what is inside the boundary." They improved performance by refining tool descriptions to use more explicit language (e.g., using "keep" instead of "remove").
  • Autonomous Error Correction: Through the protection mechanism, if the LLM tries to use a dataset it hasn't loaded yet, the system returns an error. The LLM then "realizes" its mistake and inserts a "Load Data" step into its plan autonomously.

Key Results

The authors validated GeoGPT through four distinct case studies:

  • Geospatial Data Crawling: Successfully interpreted complex coordinate strings and keywords to download specific POIs and road networks.
  • Facility Siting: In a single natural language request, GeoGPT correctly sequenced five operations (Load, Buffer, Erase, Intersect) to find areas near subways and supermarkets but away from factories.
  • Spatial Query: The agent successfully distinguished between "hotels" (points) and "areas" (polygons) to find specific buildings within a complex spatial buffer.
  • Mapping: Demonstrated a full pipeline from raw satellite data to a finished thematic map, including cropping, land-use classification, raster-to-vector conversion, and final cartographic rendering.

Limitations and Future Work

  • LLM Uncertainty: The system is sensitive to word choice. Adding or removing a single "the" in a prompt can sometimes lead to different tool selections or failures.
  • Cartographic Diversity: Currently, the mapping tool produces functional but basic maps. Future work is needed to allow the LLM to handle more artistic and diverse cartographic styles (color schemes, layouts).
  • Reliability: While the protection mechanism helps, the authors acknowledge that making LLMs operate 100% reliably in professional fields remains an open challenge. They suggest that further research into aligning professional GIS descriptions with universal LLM knowledge is necessary.

Summary updated

Abstract

Decision-makers in GIS need to combine a series of spatial algorithms and operations to solve geospatial tasks. For example, in the task of facility siting, the Buffer tool is usually first used to locate areas close or away from some specific entities; then, the Intersect or Erase tool is used to select candidate areas satisfied multiple requirements. Though professionals can easily understand and solve these geospatial tasks by sequentially utilizing relevant tools, it is difficult for non-professionals to handle these problems. Recently, Generative Pre-trained Transformer (e.g., ChatGPT) presents strong performance in semantic understanding and reasoning. Especially, AutoGPT can further extend the capabilities of large language models (LLMs) by automatically reasoning and calling externally defined tools. Inspired by these studies, we attempt to lower the threshold of non-professional users to solve geospatial tasks by integrating the semantic understanding ability inherent in LLMs with mature tools within the GIS community. Specifically, we develop a new framework called GeoGPT that can conduct geospatial data collection, processing, and analysis in an autonomous manner with the instruction of only natural language. In other words, GeoGPT is used to understand the demands of non-professional users merely based on input natural language descriptions, and then think, plan, and execute defined GIS tools to output final effective results. Several cases including geospatial data crawling, spatial query, facility siting, and mapping validate the effectiveness of our framework. Though limited cases are presented in this paper, GeoGPT can be further extended to various tasks by equipping with more GIS tools, and we think the paradigm of "foundational plus professional" implied in GeoGPT provides an effective way to develop next-generation GIS in this era of large foundation models.
BibTeX
@misc{zhang2023geogpt,
  author = {Yifan Zhang and Wei Cheng and Shangyou Wu and Zhengting He and Wenhao Yu},
  title = {{GeoGPT: Understanding and Processing Geospatial Tasks through An Autonomous GPT}},
  year = {2023},
  eprint = {2307.07930},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.07930},
}
Figure