Wish an instant map!

Hazeraj, Aziz and Uthayakumar, Thashvar (2024) Wish an instant map! Other thesis, OST Ostschweizer Fachhochschule.

[thumbnail of HS 2024 2025-SA-EP-Hazeraj-Uthayakumar-Wish an instant map! QGIS Plugin with GenAI.pdf] Text
HS 2024 2025-SA-EP-Hazeraj-Uthayakumar-Wish an instant map! QGIS Plugin with GenAI.pdf - Supplemental Material

Download (6MB)

Abstract

The aim of this work is to develop a proof-of-concept (POC) for an open-source QGIS plugin capable of translating natural language queries into Overpass-QL to perform spatial, temporal and attributive filtering of OpenStreetMap (OSM) data. The plugin visualises query results directly in QGIS. For example, a query like "All cafés within 50 metres of a fountain in St. Gallen" is processed and rendered as a map. Unlike existing solutions that either require knowledge of Overpass-QL (e.g. QuickOSM) or are proprietary, this plugin aims to make such functionality accessible to non-experts.

The query processing consists of three main steps: (1) geoname recognition and geocoding (e.g. resolving "St. Gallen"), (2) recognition and semantic alignment of spatial entity sets (SES) with OSM attributes (e.g. mapping "café" to `amenity=cafe`), and (3) generation of Overpass-QL queries. Early attempts to implement the plugin using open source models such as LLaMA yielded suboptimal results. Consequently, a fine-tuned OpenAI GPT-4o model was used, resulting in significant improvements in query generation. Geonames were resolved using Photon, an OSM-based geocoder, in addition to OpenAI's assistant, and SES were mapped using semantic similarity analysis with pre-embedded OSM tags.

The finetuned LLMs were evaluated using 100 natural language queries, with the best fine-tuned GPT-4o model achieving a BLEU score of 0.67, significantly outperforming base models and open source alternatives. The exact match rate was 0.09, indicating room for improvement in the generation of perfectly accurate queries. Most of the generated Overpass-QL queries were functional within QGIS, with a high validity rate, although still lacking in semantic precision.

The resulting QGIS plugin, called Wish an Instant Map! (WAIM), was implemented in Python using the two preprocessing steps, together with the finetuned OpenAI LLM. The graphical user interface includes text input for queries, support for current map extents, and an expert mode for editing OverpassQL. While the system has demonstrated feasibility through black-box testing with English language queries, challenges remain, including reliability of generated queries and reliance on proprietary LLMs.
Future improvements can include the development of an OSM thesaurus to improve semantic matching, the integration of structured output for query validation, and the use of larger datasets or larger LLMs to fine-tune open-source models. Despite its limitations, WAIM illustrates the potential for combining AI with geospatial systems.

Item Type: Thesis (Other)
Subjects: Area of Application > Consumer oriented
Area of Application > Navigation
Technologies > Programming Languages > Python
Metatags > IFS (Institute for Software)
Divisions: Bachelor of Science FHO in Informatik > Student Research Project
Depositing User: OST Deposit User
Contributors:
Contribution
Name
Email
Thesis advisor
Keller, Stefan
UNSPECIFIED
Date Deposited: 18 Feb 2025 12:29
Last Modified: 18 Feb 2025 12:29
URI: https://eprints.ost.ch/id/eprint/1261

Actions (login required)

View Item
View Item