Readit News logoReadit News
morsch · 4 years ago

   osmf <lat> <long> <radius_meter> [way_area<<value>] [way_area><value>] [<tag>=<value>]...
Cool, but I often start my with a place name, as opposed to lat/long.

   osmf $(oslatlong "Berlin, Germany") <radius_meter> [way_area<<value>] [way_area><value>] [<tag>=<value>]...
Unfortunately, oslatlong doesn't exist, but maybe something else does the job?

skywal_l · 4 years ago
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",
        ...
      }
    ]

littlestymaar · 4 years ago
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)
oogali · 4 years ago
Here's a quick and dirty implementation.

https://github.com/oogali/oslatlong

morsch · 4 years ago
Awesome!
lucb1e · 4 years ago
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?
codesoap · 4 years ago
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".
petepete · 4 years ago
osmq where the 'q' is for query?
I_complete_me · 4 years ago
May I suggest osmfd? I use fd instead of find on the command line. Also it just means adding one letter and no ambiguity.
ynac · 4 years ago
XOSM - as in eXplore

CLOSM - might be better as a horror movie

Deleted Comment

streamofdigits · 4 years ago
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 Comment