NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello,

As a low-fi backup for my smarphone that I use as GPS during bike trips, I'm thinking of printing it on a single page to have a rough idea where I should head using a compass, and run a script that will 1) take the (simplfied down to 500 points) trip as input, 2) query OSM for all the towns and cities along the way, and 3) output the list that I'll then use as a road book.

Provided Overpass won't complain with too many queries, would someone have some code to share (ideally Python)?

Thank you.


Edit: The following query looks close to what I need. Is it the right way to find the city/town a point lives in?

//How to also search for _nodes_ in just one query?

way["place"~"(city|town)"](around:500,50.540853270068986,8.048780365649707,50.53106288705902,8.030823236553783);

(._;>;);

out meta;

asked 14 Sep '21, 15:49

Shohreh's gravatar image

Shohreh
85131318
accept rate: 0%

edited 15 Sep '21, 11:32

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×483

question asked: 14 Sep '21, 15:49

question was seen: 587 times

last updated: 15 Sep '21, 11:32

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum