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

Hi, I want to write a desktop application that allows visually impaired users to browse the world. The user starts at country level with one country having the focus. The user can then use keystrokes to find bordering countries with audio feedback on the direction to that country and its distance. The user can jump to a neighbouring country and so navigate the world. Could also apply to oceans.

The user can choose to go down an administrative level and use the same process to navigate within a country. For examples, states in the US or counties in the UK. And again, could apply to the seas that make up oceans.

I also want to load cities and towns and other points of interest. These could be nodes like a railway station), a way (like a river) or a polygon (like a national park).

I have a little experience with OSM as I've written an application that lets the user navigate roads / highways by moving from intersection to intersection. For this I download nodes and ways to my application on the fly using an overpass query. As the user moves near the edge of the current data then more data is downloaded.

I was thinking of using a similar approach for my world navigating application but I have a couple of major problems.

Firstly, I can't work out what the query is to download boundary data for a country or internal administrative areas. I really struggle with the overpass API. I've also read that country boundaries on OSM include maritime boundaries and not the physical border of the land. And I only really need quite low res data.

Secondly, I have a query that downloads all the cities and towns in a country but then to work out what areas / polygons they are in sounds like a computationally heavy task to do on the fly.

So is my approach a good one or is there a better approach? Is doing it on the fly sensible or am I better off building a database? I mean, I could probably pack quite a lot of useful data into 10Mb. And is OSM a good source of boundary data? If it is, please can someone help with suitable overpass queries. And if not, what are alternatives?

I haven't yet written a line of code for this project although I'm very excited about it since it may lead to me being able to explore the world in a way I can't currently do any other way. So any help much appreciated.

This question is marked "community wiki".

asked 11 Oct '23, 19:55

Chessel's gravatar image

Chessel
11556
accept rate: 0%


Downloading country boundaries with overpass is quite simple: https://overpass-turbo.eu/s/1C5x but the amount of data is enormous, since all details are contained in the data.

Subunits can be loaded by setting the appropriate admin_level: 4 = states, 6 = counties, 8 = cities.

permanent link

answered 17 Oct '23, 15:43

fx99's gravatar image

fx99
196233
accept rate: 0%

Many thanks for your reply. So forgive me but I couldn't follow the example to download Luxembourg's border. Can I highlight that I am blind so Overpasss turbo isn't that obvious a thing for me to use as I don't see the graphical output. The active part of the query seems to be: nwr["admin_level"="2"]["boundary"="administrative"]"int_name"="Luxembourg"; When I have used the overpass API to date I start a URL with: http://overpass-api.de/api/interpreter?data= So I pasted the active part of the query to the end of this and added 'out;' The complete thing is: http://overpass-api.de/api/interpreter?data=nwr["admin_level"="2"]["boundary"="administrative"]"int_name"="Luxembourg";out; And I paste this into my favourite browser. I get a parse error though. Where am I going wrong?

permanent link

answered 17 Oct '23, 19:54

Chessel's gravatar image

Chessel
11556
accept rate: 0%

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:

×129
×58
×49

question asked: 11 Oct '23, 19:55

question was seen: 2,174 times

last updated: 17 Oct '23, 19:54

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