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

Hi,

I'm writing a Java Android app that requires me to download all the ways within a certain region but can find no example of a method for doing so.

Could anyone point me in the right direction?

Many thanks

asked 26 Feb '20, 01:58

Wally's gravatar image

Wally
11112
accept rate: 0%


Large scale extracts are served by several providers based on the main planet file.

Any filtering for the feature types you're after will probably need to be done on your servers according to your specific criteria. (Osmosis seems frequently mentions in this forum for such taks but I have no first hand knowledge of this.)

I believe the likes of OsmAnd pull whole planet dumps and keep them updated with the minutely diffs. These are then run through their conversion software and then split into the region's their users can download in app. For subscription customers this is done on an hourly basis.

https://wiki.openstreetmap.org/wiki/Osmosis

permanent link

answered 26 Feb '20, 08:04

InsertUser's gravatar image

InsertUser
11.0k1369185
accept rate: 19%

Are you sure you only want the ways - without the accompanying nodes you will not know the geometry of the ways (just "there is a street named X with speed limit Y somewhere in the area I requested")? And without the relations you will also miss some semantic information - what looks to you like two featureless ways can turn out to be a building if you look at the relation that combines the two.

A common tool for downloading data in an area is Overpass. Its query language is described here https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL and an example that does what you want is here https://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Usage_examples:_All_data_in_a_bounding_box. There are a couple of free and public Overpass servers (see https://wiki.openstreetmap.org/wiki/Overpass_API#Public_Overpass_API_instances) however if your app makes intensive use of the service and/or you need to rely on it you should probably set up your own server (everything is Open Source).

permanent link

answered 26 Feb '20, 10:00

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Thanks for the replies.

Basically what I'm after is all the walkable highways - i.e. roads and paths - within a region and I want to be able to extract the routes as sequences of coordinates which, as I understand it I can extract from the nodes.

I should say I'm very new to OSM and am finding it hard to find a straightforward introduction to the data types and how they can be used within a java program.

Many thanks for your help.

(26 Feb '20, 11:38) Wally

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:

×181
×167
×76

question asked: 26 Feb '20, 01:58

question was seen: 1,529 times

last updated: 26 Feb '20, 11:38

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