OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.


A fix has been applied to the login system for the forums - if you have trouble logging in please contact with both your forum username and your OpenStreetMap username so we can make sure your accounts are properly linked.

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

Registered: 2010-07-10
Posts: 37

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


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


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

From: Belgium
Registered: 2011-11-25
Posts: 210

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"/>
     <recurse type="way-node"/>
   <print mode="meta"/>

Enter that into

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.



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

Registered: 2008-05-28
Posts: 2,606

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?


Board footer

Powered by FluxBB