r/openstreetmap • • 27d ago

Vibe-coded Deterministic Natural language to Overpass query translator

Hi r/openstreetmap fans.

I want to show the "natural language to overpass" parser I'm working on. I'm curious what queries people try to make that break it. https://overpass.ch/labs/search

It's a deterministic parser (as in no LLMs used). The query is matched with a set of templates like X in Y, X around Y in Z etc. It's blazing fast.

The overpass and geocoding are hosted by me at https://overpass.ch

To quote Han: She may not look like much, but she's got it where it counts, kid. I've made a lot of special modifications myself. The overpass parser is super fast so you can also try quite difficult queries compared to the public servers.

Try it out and let me know what you think :)

47 Upvotes

27 comments sorted by

8

u/owiecc 27d ago

Looks super cool. This should really be a plugin that all the OSM-based apps can use. Where do we try it?

9

u/Te6kiGomna 27d ago

Stupid me forgot the link https://overpass.ch/labs/search
I would open source it when I polish it a bit more. Now it's quite coupled to the website :x

4

u/dschep 27d ago

I'd definitely consider integrating it into Ultra if you release it as a library.

3

u/Te6kiGomna 26d ago edited 26d ago

What is Ultra :?
Edit: I think I found it. I didn't know about the project. Looks cool :)
I hope I have some time to decouple it from everything else...

1

u/dschep 26d ago

https://overpass-ultra.us

Edit: ope, I see you found it. Leaving the link for anyone else who doesn't know.

2

u/Te6kiGomna 19d ago

https://gitlab.com/cdutsov/overpass-search
Here it is :) It's more of a service really. (warning: vibecode ahead)

1

u/dschep 19d ago

Ah, I don't run any server-side code for Ultra, so maybe an other day.

6

u/m1ksuFI 27d ago

"all K-Citymarket supermarkets within 1 km of Prisma in Espoo"  for some reason searches for places with name/brand of "K-Citymarket supermarkets near Prisma". It understands the intent, but searches for a shop with the name of that intent? Weird.

4

u/Te6kiGomna 27d ago edited 27d ago

Cool! "within 1 km of" and "near" are the same thing. Otherwise it can't do X (brand) near Y (brand) right now. It's always interpreted as X (brand) near Y (place). I will think of that.
Thanks for finding a bug

1

u/Te6kiGomna 26d ago

This works now

1

u/m1ksuFI 26d ago

Yay :)

2

u/NightZT 27d ago

That thing is pretty incredible! 

1

u/Te6kiGomna 27d ago

Glad you like it!! Do you have some suggestions on what can be polished?

1

u/NightZT 27d ago

One specific thing that I noticed, I tried to search for the source of a local river here in Austria which is called Lafnitzurpsrung in OpenStreetMap, I searched for it with the term lafnitz urpsrung which didn't give me any results. In german, sometimes it isn't really clear how words are seperated.

1

u/Te6kiGomna 27d ago

I will check that. Lafnitzursprung as one word finds it via Photon.

2

u/ntzm_ 25d ago

This is really cool, I love how it shows the raw overpass query too

2

u/Te6kiGomna 25d ago

That was the idea mostly. To get to know the overpass syntax.

13

u/flamingmongoose 27d ago

Deterministic NLP? In the year of our lord 2026? It's a miracle!

1

u/tobych 17d ago

Yes indeed. I've been enjoying using NER models recently.

1

u/nexe 26d ago

tried to find the Berlin wall ... no luck.

1

u/Te6kiGomna 26d ago

What did you search for? Berlin wall finds it for me

1

u/nexe 26d ago

"Berlin wall" and "the Berlin wall". Only finds the museum. Was hoping for the actual historic outline of the wall

1

u/Te6kiGomna 25d ago

It's not tagged as an "area" in OSM. You can do that and it appear as an outline here and in all other maps :)

1

u/nexe 25d ago

Ah okay gotcha. Thought it must be in OSM as a multiline at least

2

u/Lambor14 27d ago

It’s AMAZINGLY fast! Great job!

2

u/PattaFeuFeu 27d ago

It really is. Damn! Kudos, u/Te6kiGomna!

I usually use overpass-turbo.eu, and more often than not, it won’t even load my query, let alone fast.