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 |
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. answered 26 Feb '20, 08:04 InsertUser |
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). answered 26 Feb '20, 10:00 Frederik Ramm ♦ 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
|