Skip to content

Teakinboyewa/SpatialAnalysisAgent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpatialAnalysisAgent

The Spatial Analysis Agent is a user-friendly plugin that serves as a "Copilot" in QGIS software. This GIS Copilot allows users to perform geospatial analysis directly within QGIS using natural language queries, making it accessible for both experts and beginners.

The Copilot leverages QGIS processing tools, and other external tools such as Python libraries (e.g., Geopandas, Rasterio, seaborn, etc.). Whether working with vector data, raster analysis, the Spatial Analysis Agent offers a flexible, AI-driven approach to enhance and automate GIS workflows. For more details on the framework used by this plugin, refer to our preprint manuscript: Temitope Akinboyewa, Zhenlong Li, Huan Ning, and M. Naser Lessani. 2024. "GIS Copilot: Towards an Autonomous GIS Agent for Spatial Analysis." arXiv. https://doi.org/10.48550/arXiv.2411.03205

QGIS Plugin page: https://plugins.qgis.org/plugins/SpatialAnalysisAgent-master/

Installation

  • In QGIS software, select Plugins > Manage and Install Plugins...
  • Find AutonomousGIS-SpatialAnalysisAgent and click Install Plugin

Alternatively,

  • Download the master repository of the plugin from GitHub
  • Launch QGIS software and navigate to Plugin > Manage and install Plugins.. > Install from ZIP
  • Click on ... to select the directory of the downloaded zip file and Install plugin

User Manual

The User Manual is available here

Plugin Interface

User Interface.png

Settings_tab.png

Note: API keys input here will only be stored locally on the user's computer ('plugin_dir/SpatialAnalysisAgent/config.ini').

Demonstration

Select.residential.area_3.mp4
Contour.creation.Example2.mp4

YouTube Video

YouTube Video

YouTube Video YouTube Video YouTube Video

Find more examples on the Case Studies page

Installing required libraries

Required python libraries

  • openai
  • langchain_openai
  • nest-asyncio
  • networkx
  • pyvis
  • geopandas
  • IPython
  • iface
  • jsonpickle
  • regex
  • toml
  • seaborn
  • pydantic

Note: All the required python libraries are expected to be installed automatically. However, if any of these python libraries failed to install automatically, you may install them manually by following the steps below to install the libraries.

Libraries installation guide

Using 'openai' as an example, follow these steps to install any python library:

  • Open the QGIS Python Console by navigating to Plugins > Python Console or press Ctrl+Alt+P
  • In the console, run these two lines of code sequentially:
    import pip
    pip.main(['install', 'openai'])