Readit News logoReadit News
jjwiseman · 2 years ago
I've played around with Overpass and GPT a bit. Here are a few examples that I think demonstrate the potential:

Find all buildings that straddle the boundary between Glendale and Burbank in California:

https://twitter.com/lemonodor/status/1636849040548675584

Finding the suspected origin of an explosion, by using the time from seeing the explosion on video to the time the sound of the explosion reaches the microphone:

https://twitter.com/lemonodor/status/1636859983223734273

Someone on twitter asked "Is anyone aware of any 4 way stop intersections in Australia?"

https://twitter.com/lemonodor/status/1516239321094713346

Finding examples of airport runways that cross highways:

https://twitter.com/lemonodor/status/1709598048459132976

Finding banks that might be at risk of robbery:

https://twitter.com/lemonodor/status/1716153200750051332

jjwiseman · 2 years ago
Bellingcat's Bellingcat OpenStreetMap search is a tool that wraps Overpass Turbo in an easier-to-use interface for the specific task of geolocation based on image and videos: https://osm-search.bellingcat.com
jjwiseman · 2 years ago
Here’s a video showing the sort of geolocation task the Bellingcat tool is intended for: https://youtu.be/GqKNKQ02pjY?si=DyAB3YZzl3gJUzT9
WaxProlix · 2 years ago
This is awesome, but a lot of the queries I've tried to make seem to fail on OSM's data itself, which is sad. For instance, "coffee shops within a certain distance of fast EV chargers" would be really valuable, but the underlying data just doesn't have that EV data. So it's cool for a lot of stuff, but mostly explicitly streets; the other kinds of nodes all exist but aren't as well fleshed out as they could be (totally understandable).
Doctor_Fegg · 2 years ago
That’s because we’re all cyclists ;)
dabber · 2 years ago
For anyone else curious:

Source code for the backend here: https://github.com/drolbr/Overpass-API

Found from this link listed in the help modal: https://overpass-api.de/ (also links to two additional frontends.)

shpx · 2 years ago
I've been asking ChatGPT to write Overpass Turbo queries and it does a good job.
stevage · 2 years ago
Yeah, I've had that experience too. Or at least it gets close enough that I can make it work.

The Overpass QL language is the most...bizarrely constructed language I've ever had to use. It's a bit hard to believe that the person who designed the language thought this was a perfectly reasonable statement:

   (._; >;);

Aachen · 2 years ago
I read up on the syntax a few years ago and, by learning only a few of the symbols, it actually starts to make a lot of sense and seemed like a nice shorthand.

I then promptly forgot everything and find the syntax very annoying again nowadays... seriously, it's weird remembering having knowledge but not having the knowledge itself anymore

dylan604 · 2 years ago
I really don't understand the point of shortcuts where this is the result.

I'm a really big fan of clear and legible code. I'm not at In-n-Out with a secret menu. I'm trying to make changes/updates to code someone else wrote. I don't care how clever they felt they were by using esoteric shortcuts that might make things short and fit on one line. I want to be able to read the code and follow what it does in the least amount of time. Now, if the compiler makes different/better decisions when reading something like that vs much more legible code, we can maybe have a discussion.

vloewe · 2 years ago
I scraped the these websites https://wiki.openstreetmap.org/wiki/Map_features and gave it to OpenAI's Assistant maker -> This made great results in making valid queries

Could even make prompts like "Can you find the buildings closer than 500m to a café?"

Alifatisk · 2 years ago
Gotta agree with you, the QL is strange. I tried using the wizard but it kept spinning. I tried asking Bard and ChatGPT but they provided invalid syntax.

This is sad because overpass is extremely powerful tool.

I’ll give the tutorials other commenters linked a try.

e-v · 2 years ago
Lucky you! I tried learning with examples generated by ChatGPT and none of them worked at all. I then learned the basics of the API by reading this excellent tutorial: https://osm-queries.ldodds.com/tutorial/, and realised that, in hindsight, ChatGPT's answers weren't even close to being correct.
Raphaellll · 2 years ago
we systematically tested this: https://arxiv.org/pdf/2308.16060.pdf
maelito · 2 years ago
Where can we use it ? I couldn't find a link. It is closed-source ?

OK, I had a hard time understanding that the link given above is the demo of this paper.

https://overpassnl.schumann.pub.

Very interesting. Quite surprising too : it can find non trivial searches like "bars with darts" ("bars à fléchette" in French), but not easy ones ("fromagerie" or "dermato").

More complex queries did not work : "cafes close to the river" returned nothing, neither did "touristic site close to a pedestrian area" or "touristic streets".

zarazas · 2 years ago
webel0 · 2 years ago
It does. The problem is that I have a hard time determining if the output is, indeed, what I was trying to query in the first place!
maelito · 2 years ago
Yes. It was way harder with the other LLMs. Except Claude maybe.
lmeyerov · 2 years ago
Related: If any OSM GIS engineering enthusiasts, we have a small OSS repo we are looking for an assist on that should be fun for the right person: Spin up a big box, quickly render planet-scale tiles at a decent level (maptiler), and restart as a more reasonably-sized zoom level for serving. We did the core infra/devops, and are looking for someone to help tweak the perf knobs etc. See my profile on how to reach.
Doctor_Fegg · 2 years ago
Do you really mean maptiler? tilemaker or planetiler will do a better job of “quickly rendering planet-scale tiles”.
mistrial9 · 2 years ago
please disclose if you are asking for an unpaid intern or volunteer with certain qualifications
lmeyerov · 2 years ago
Sponsor, even!
marklit · 2 years ago
I built osm_split to extract OSM features into named GPKG files. It makes it easy to pick features by name and drop them into QGIS. https://github.com/marklit/osm_split
RicoElectrico · 2 years ago
Isn't the point of GPKG that you can bundle multiple named layers in one file?
marklit · 2 years ago
Yeah, you can. The file will be huge though and QGIS won't be performant. Somewhere like Tokyo will be ~400 MB in OSM's PBF format but will contain ~1,300 different types of features.

Seeing these listed in alphabetical order in a file explorer makes it easier to track down only what you need to build your map.

It could be you only end up using 150 MB of GPKG files and QGIS, even on an old laptop, would be performant.

ImaCake · 2 years ago
There is a QGIS plugin for this API as well which is excellent.

Note that in openstreetmap.com you can zoom in and query items (cursor with question mark icon) to get the feature information that you then use in Overpass. Very useful!

Freak_NL · 2 years ago
openstreetmap.org not .com (!)
flexagoon · 2 years ago
openstreetmap.com just redirects to the .org domain. There's also just osm.org, which is much easier to type.
westnordost · 2 years ago
Regarding data mining tools for OpenStreetMap, there is also a tool with which one can use SPARQL syntax. This means that one could conflate data with wikidata or other data sources easily, too:

QLever: https://qlever.cs.uni-freiburg.de/osm-planet

Actually, there are two. Sophox is around for longer:

Sophox: https://sophox.org/

vloewe · 2 years ago
Overpass is great!

Published a ShowHN about Atlas.co yesterday, but I also just want to mention that we have a Overpass Turbo OSM integration that enables you to query data directly in a map and then download it as geojson, kml or shp (obv you can also style it and use it in analysis). Might be useful for some