Show HN: Fast deterministic natural language search for OpenStreetMap data
hippomaps.chI want to show you HippoMaps. It is a fully featured map and navigation app built on OpenStreetMap with a custom Overpass API engine for really fast search of POIs, areas and ways.
My aim with HippoMaps is to get to a level where I don't need Google Maps anymore. The biggest hurdle IMHO with OSM based apps is the lack of nice and fast search (where GMaps excels at). To get there I started working on a deterministic (as in no LLMs used) parser of queries that translates them to the Overpass QL.
Search queries are split into tokens and the algorithm tries to guess "what" you want to search and "where". The former comes from a word list (known brands, sports, OSM tags) and the latter from the geocoder service (Photon).
You can get quite creative like "cafes in Zurich by the Limmat", "peaks over 4000 m in Valais", "pharmacies open now in Bern". It's good for discovering hiking trails, e.g. "hiking trails from Arth-Goldau to Rigi Kulm". It knows how to find stuff between two places, next to a place, near a place and so on. You can stack those as well like "bridges over the danube in serbia 50 km from novi sad".
Except the search it has almost all of the features you would expect from a map like turn-by-turn navigation (Valhalla) with voice (Piper), public transport navigation in Europe (MOTIS), live traffic (only a few countries so far).
The app is GPL-3.0: https://github.com/cdutsov/hippomaps
I'm looking forward to feedback on searches that work or don't work for you + overall comments.
Nice to see a GPL 3.0 project here. As someone who likes nerd stuff but does not work in the startup world, most of the "Show HN" projects I see posted are dismal and mercenary.
I don't see the benefit of keeping a maps app to myself. I also used LLMs a lot for the coding of this because I don't have that much free time. It feels weird to close source something like that.
I noticed that there's an android version that I figured I'd check out: https://github.com/cdutsov/hippomaps/blob/main/android/READM...
The README suggests that the app is published to F-Droid:
> F-Droid builds the app from the tag v<versionName> (recipe metadata/ch.hippomaps.app.yml in fdroiddata) and publishes it with our signature: the build is reproducible, so F-Droid copies the signature of our APK onto its own build and publishes only when the two are the same.
but I see no such app: https://search.f-droid.org/?q=hippo&lang=en
nor do I see an issue requesting its inclusion: https://gitlab.com/fdroid/rfp/-/work_items?state=all&search=...
(I also didn't see it in the Google Play Store, though I wouldn't be installing it from there anyway.) Is there another place I should be looking for the app?
Natural search feels like such a mundane feature, but I consider it damn near revolutionary. Properly setting filters is literally impossible with most maps apps and with the others it’s just impossibly hard. So cool that you managed to do this deterministically!
> Properly setting filters is literally impossible with most maps apps
wdym?
Its not very polished still, but I hope it can be a decent example of what we could have as FOSS maps
Maybe have it tell you some limitations on certain searches,
"A cafe in {my town} with a nice view". Returned 16 hits, but not ones with a nice view. I guess there's no way for it know. Unless you can get access to online reviews.
Edit: It chose a "node" of a "viewpoint" and found cafes within 1.1km of that. Interesting, but not correct.
This is really cool! I tried building something similar recently (with an LLM-based query parser), but you definitely executed it much better.
I immediately noticed some quirks in the parsing - for example: https://hippomaps.ch/?q=campsite+within+100+ft+of+a+mine+in+...
In that query, it should interpret "campsite" as (tourism=camp_pitch || tourism=camp_site), not camp_site alone, and "mine" as (industrial=mine || historic=mine), not minefield! (The camp_pitch vs camp_site distinction is very annoying and I wish those had better names.)
I was too building something similar 2 months back.. the intent was to be able to locate places with such queries, for example:
"sparsely populated urban residential areas with >75% greenery nearby".
I was able to make it work.. tested it on a small area of 50x50 km2.
But the costs were insane.. first to populate the database, and then to host the query engine.
HippoMaps runs on a 4-core AMD from 2019 with 64 GB ram and 1 TB ssd. The map tiles are on a separate server that's more beefy but I also sell access to Overpass there so that covers the costs more or less.
I should have been more clear on the serving part... i meant the tiles, not just the "query engine".
Actually hosting Overpass (the thing that queries the OSM data) takes more or less the same space as the map tiles. I am sure that there is a more efficient way to do that, but the vector tiles and Overpass use different databases
This is cool! I've been up and down the map stack, but never dug into the query layer like that. It's so fast on the search and generally works well.
I love the features mappings you do, then you wrapped a nice UX around it. I did try to find dispensaries in Stamford, which here means cannabis retailers. It mapped that to "pharmacies" instead, so I got a CVS drug store. It got my Stamford (CT) correct and suggested a few other Stamfords (like VT).
Since it is Golang, so you might be interested in our ntmaps library. It is MIT-licensed, so should be compatible. It would let you make terminal apps with this (or browser, but you handled that already).
https://nimbleterminal.github.io/ntmaps/?demo=explorer
Cool. I will definitely check this out. I love terminal apps. Never thought of terminal m*apps, that'd be fun.
This worked quite well! I gave it some very funky queries and it handled them like a pro. I've never even considered the complexity of mapping user queries to real geographical locations. I feel if the menu on the left was a bit cleaner that I would totally scrap Google maps. Very well done!
This is cool but still runs into the same issue i have for "H-E-B" a texan grocery store, where looking up "heb" does not find it.
This is really nice, thanks! A feature request, can you add "houses" as a searchable feature? E.g. "houses more than 1km away from sewage works and more than 200m away from major train lines and more than 200m away from any loud pubs". IMO that would be a cool feature for people searching for places to rent
Thats a nice idea. It already would work I think, except that it doesn't know about sewage works and loud pubs.
"Houses more than 300 m away from pubs and more than 1 km away from train stations"
This already works
Ooh thank you very much ! Someone skilled please find funds to have this running for free for eveybody using CoMaps !
I am not sure how to make it run offline as it needs machine with a lot for RAM and SSD right now (not the query translator, but the query engine). As a plugin that does the query online and returns POIs, that would work quite well I think.
This is a great addition to OSM, we definitely needed it. Thanks for building this.
Thank you! I hope it can encourage more people to map their surroundings.
I just got very confused that i clicked a link and got a coffee spot suggested mere 5km away from me
Does it work offline? That's the main time I use osm
Unfortunately not. I need about 3 TB of SSD for the map tiles, query engine, routing and navigation and languages.
Could it be segmented if a user just wants a specific area and can dedicate a few hundred megabytes? I'm glad you built this, OSM search has always seemed terrible!
Yes indeed. For tests I use just a segment of Luxembourg or Monaco that takes very little space. I could think of a dedicated offline app. Problem is that the search is Rust and Go and I'm not sure how does this work on android.
I think you could do some native code interop, but I'm not sure! Regardless, impressive work!
Would there be a way to maybe expose it as an API so you have only the search part and not the rendering?
Why does a search engine need tiles? Could use it with any tile server
Vector tiles are relatively small. The data necessary for a full Overpass query server is huge.
I tried “cafes by the Limmat 100 m from the lake in Zurich.”
The parser restated it clearly, but returned just one result: Felix at Bellevueplatz 5.
Nearby, the map shows several other café-like places, so I wasn’t sure whether the search was intentionally strict or only matching a narrow OSM category.