I like searching for POIs via a query language on Overpass. My queries tend to be quite simple - "get all amenities of x type, in y area that have z tag". The rendered map showing matching POIs is a nice-to-have, but not completely necessary.
What is the best way to do this offline, on Linux? (ideally using software already packaged for Debian, but that's not vital).
I'm imagining a REPL that I can pass a downloaded map to, and then can query and see the results (in an ideal world, rendering them too).
It seems database schemas are close to what I want, but they seem to be designed more for people doing large scale complex queries and building bespoke databases just with the information they want.
Are these tools a good fit for my use case, or is there is a better/simpler way?
14 Comments
balsoft@lemmy.ml · 5 pts · 239d
I wish there was a way to subscribe to post comments on lemmy - I was looking for something like this myself.
ambitiousslab@feddit.uk · 3 pts · 239d
I can fake it by sending you a message if anything good comes up :)
HubertManne@piefed.social · 2 pts · 239d
not sure about lemmy but there is a bell icon in piefed that I think subscribes to posts. I mention because its easy to miss.
BarHocker@discuss.tchncs.de · 1 pts · 239d
I am using the "favourite/save" function similar to this. I do not get noifications but I can go through my saves every now and then.
schnurrito@discuss.tchncs.de · 3 pts · 239d
How big are the "downloaded maps"?
JOSM can do fairly complex queries with its search feature, maybe that satisfies your needs; but if you're dealing with very large areas, they might overwhelm JOSM and not load in it.
ETA: of course "downloaded maps", if you mean .osm files, are just XML files, so it's completely trivial to write simple scripts to search through them oneself
ambitiousslab@feddit.uk · 1 pts · 239d
Thank you for the tips! I should have been more precise in my question. The downloaded maps are ~150MB, in PBF format (although I would have been happy to use any other standard format if needed). I went with
osmium tags-filterin the end, and it seems to be working well.gkaklas@lemmy.zip · 2 pts · 239d
I could't find anything with a quick search, but maybe you could run the API server in an application container (e.g. Docker)? 🤔
For more simple use cases, some apps on Flathub might be enough, for example Comaps
(Also, I haven't used JOSM in a while, but it might be worth checking that out as well to see if it can do want you want)
ambitiousslab@feddit.uk · 2 pts · 239d
Thank you. Of those I think JOSM is the most appealing, if it can directly show the results on the map. I'll give it a go later just out of interest.
I also gave
osmium tags-filtera go and it's meeting my needs for now.MoonMelon@lemmy.ml · 2 pts · 239d
Can osmium-tool do what you want?
For example if I go here and export an
osmfile aspittsburg.osm: https://www.openstreetmap.org/export#map=18%2F40.440748%2F-79.999822Then I run
osmium tags-filter pittsburg.osm n/amenity=library -o out.osmI get an
out.osmwith a bunch of libraries in it:ambitiousslab@feddit.uk · 2 pts · 239d
Thank you, this is perfect! Lightweight and easy to set up.
SomeoneElse@en.osm.town · 1 pts · 239d
@ambitiousslab Just follow one of the "server" guides at switch2osm.org, but don't bother with the rendering bit.
You can add extra database columns easily (if you want extra keys).
"on Linux" might cover anything from a greeting card to a supercomputer, but assuming you're on something resempling a PC and don't want to query the entire world, this should work.
ambitiousslab@feddit.uk · 1 pts · 239d
Thanks for the tip! Your assumptions are correct.
Someone else suggested
osmium tags-filteron the downloaded PBF files (which are ~150 MB), and that's working well at the moment. I'll keep this in mind as I'm presuming that importing into a database will be more efficient in case I ever increase the size of the map I'm working with.giggls@karlsruhe-social.de · 1 pts · 239d
@ambitiousslab Most #openstreetmap software is running on Linux. Almost certainly overkill but if you know about SQL it is possible to setup your own #Postgis based POI database. I have such a beast running as a backend for #opencampingmap see https://poi.openstreetmap.de/ for details.
ambitiousslab@feddit.uk · 1 pts · 239d
I spent quite a while browsing your brewery map earlier, very cool!
It is probably overkill for me at the moment, but it's good to know if my needs ever scale up dramatically. Thank you!