Monday, August 07, 2023

OSM GPT

This week's OSM Weekly links to a new interactive chatbot which allows you to interact with OpenStreetMap data.

Rohit Gautam's OSM GPT allows you to use natural language queries to search OpenStreetMap. For example the screenshot above shows the results of 'Get all bars' in New York. It also shows the results of a query to 'Get all McDonald's restaurants'.

I don't know how OSM GPT works but I presume it uses the ChatGPT large language model to translate user queries into recognizable OpenStreetMap tags. It then uses Overpass Turbo to query OpenStreetMap data and show you these query results on an interactive map. For example if I type 'mosque' into Overpass Turbo I don't get any results. This is because mosques are tagged 'amenity: places of worship' and 'religion: muslim' on OpenStreetMap. OSM GPT is actually able to interpret my search for 'get mosques' in London and realizes that in terms of OSM I am looking for locations tagged as 'places of worship' and 'muslim'. 

In other words OSM GPT is really a natural language interface for Overpass Turbo. Which is great as creating queries in Overpass Turbo can be very difficult for those not familiar with Overpass QL. OSM GPT even creates the Overpass Turbo query for you. Which is fantastic if, for example, you want to run a similar query on Overpass Turbo for another town or city. Another brilliant feature of OSM GPT is that it allows you to download the results of all the queries you make as a GeoJSON file. 

You can also use OSM GPT to search within a defined range of a location. For example the screenshot above shows the results of searching for 'post offices within 1,000 meters of the Embarcadero, San Francisco'.

Also See

Texttomap - enter any geographical based question into Texttomap and it will attempt to answer your question and show you the results on a map

mapsgpt - an interactive map which allows you to search using input forms to generate natural language queries.

No comments:

Post a Comment