OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2012-11-29 18:42:45

How to download specific tags (eg highway=secondary) in JOSM?

Hi,

I'm wanting to download ways with specific tags, eg highway=secondary/building=yes, for a certain area in JOSM but im not sure how. As far as i can tell there's a thing called XAPI that will do this but it looks very complicated and I cant understand what to do. Can someone tell me how, in layman's terms, please? A quick walk through would be helpful.

Much appreciated, Will. smile

Offline

#2 2012-11-29 21:00:28

Re: How to download specific tags (eg highway=secondary) in JOSM?

Overpass API is what you need:

     <query type="way" into="networks">
       <bbox-query s="49.5" n="51.5" w="2.52" e="6.5"/>
       <has-kv k="highway" v="secondary"/>
     </query>
     <recurse type="way-node"/>
   </union>
   <print mode="meta"/>

Enter that into http://overpass-api.de/query_form.html

And save the result as an  file with an .OSM extension. (first limit the coordinates, or you'll end up with all the secondary roads in Belgium)

Then open that file in JOSM.

Jo

Offline

#3 2012-12-01 18:21:26

Re: How to download specific tags (eg highway=secondary) in JOSM?

There is a JOSM plugin called mirrored_download or similar.

First purpose of that is to get OSM data from a mirrored server much faster if you want to load large areas.

But second benefit is that you can add a filtering parameter like [highway=*] or [boundary=administrative] or anything you want.

it uses the same parameters that you can find in the OSM wiki about xapi download.

Does this work for you?

Offline

Board footer

Powered by FluxBB 1.4.8
Hosting sponsored by Oxilion