6 ms·
Osmf: A simple command-line tool to explore OSM data (2020)
- morsch 5y agoosmf <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 5y agoThe 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 5y agoJust 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)
- skywal_l 5y agoYes 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/
- littlestymaar 5y agoI 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.
- oogali 5y agoHere's a quick and dirty implementation. https://github.com/oogali/oslatlong https://github.com/oogali/oslatlong
- morsch 5y agoAwesome!
- lucb1e 5y agoWell 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?
- deleted 5y ago[deleted]
- codesoap 5y agoAuthor 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".
- streamofdigits 5y agoit 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 5y ago[deleted]