Osmf: A simple command-line tool to explore OSM data (2020)(github.com)
github.com
Osmf: A simple command-line tool to explore OSM data (2020)
https://github.com/codesoap/osmf
19 comments
The nominatim service will provide you with a lat/lon:
$ curl -s 'https://nominatim.openstreetmap.org/search?q=36%20Quai%20des%20Orfevres%20Paris&format=json' | jq .
[
{
"place_id": 5797794,
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
"osm_type": "node",
"osm_id": 676748219,
...
"lat": "48.8554631",
"lon": "2.3430218",
...
}
]Just be cautious with nominatim's rate limiting: you'll get banned pretty quickly if you ever put such queries in a script without a delay between different queries, a dozen of queries run in parallel or close together is enough. (been there, done that)
Yes indeed. Note that you can always run your own nominatim service :)
https://hub.docker.com/r/mediagis/nominatim/
https://hub.docker.com/r/mediagis/nominatim/
I wanted to get the location for literally 48 addresses (I just wanted to get the location of all the nanny around my home!), clearly running a nominatim instance wasn't an option but I didn't expect my little script to get me banned instantly…
Fortunately the ban wasn't that long and the next day I managed to get the list I wanted, after putting a one-second delay between each API call.
Fortunately the ban wasn't that long and the next day I managed to get the list I wanted, after putting a one-second delay between each API call.
Well that's kind of confusing with the OSMF being a (in the community) very widely used abbreviation to refer to the OpenStreetMap Foundation. I guess we'll differentiate based on capitalization?
Author here. I've heard that before. Maybe I should really rename. Got any suggestions? "osms" (OSM search) might be misleading because it reminds me of SMS. "osmfind" is a little long for my taste, but well, maybe it's better than "osmf".
osmq where the 'q' is for query?
Oh, I like that one. I'll think about it for a bit, but maybe I'll take it. Thanks!
I just discovered https://osmq.eu and https://osmq.org. I guess this name is taken :(
May I suggest osmfd? I use fd instead of find on the command line. Also it just means adding one letter and no ambiguity.
Good idea. I'll think about it. Thanks!
[deleted]
it sooths my soul that next to the cryptobros and data oligarchs there is a small community that chips away at making the world a better place - one command line tool at a time
[deleted]
Cool, but I often start my with a place name, as opposed to lat/long.
Unfortunately, oslatlong doesn't exist, but maybe something else does the job?