You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
#1 2017-08-18 22:13:44
- Shohreh
- Member
- Registered: 2012-12-15
- Posts: 247
[SOLVED] [JOSM] Query works in OverpassTurbo, but fails in JOSM
Hello,
This works fine in Overpass Turbo:
[out:json][timeout:25];
rel(123);map_to_area -> .searchArea;
(
node["highway"="traffic_signals"](area.searchArea);
way["highway"="traffic_signals"](area.searchArea);
relation["highway"="traffic_signals"](area.searchArea);
);
out body;
>;
out skel qt;But it fails when copy/pasted into JOSM (File > Download from Overpass API):
rel(123);map_to_area -> .searchArea;
(
node["highway"="traffic_signals"](area.searchArea);
way["highway"="traffic_signals"](area.searchArea);
relation["highway"="traffic_signals"](area.searchArea);
);
out body;
>;
out skel qt;
What's wrong with the query?
Thank you.
Last edited by Shohreh (2017-08-19 10:12:46)
Offline
#2 2017-08-19 08:35:31
- mmd
- Member
- Registered: 2010-11-06
- Posts: 2,150
Re: [SOLVED] [JOSM] Query works in OverpassTurbo, but fails in JOSM
There are multiple issues with your query:
* JOSM requires XML format, JSON format will not work
* JOSM requires metadata, out body; >; out skel qt; will not do as they don't include object version numbers. Use (._;>;);out meta; instead
In general it's probably best to use Export --> load data into an OSM editor: JOSM and have your query automatically fixed.
Last edited by mmd (2017-08-19 08:38:11)
Offline
#3 2017-08-19 10:12:30
- Shohreh
- Member
- Registered: 2012-12-15
- Posts: 247
Re: [SOLVED] [JOSM] Query works in OverpassTurbo, but fails in JOSM
Thanks much.
I agree, but I needed to download a subset of the data from OSM, not everything in a given area, hence my using a query to Overpass.
Offline
#4 2017-08-19 11:05:38
- escada
- Moderator

- Registered: 2011-08-13
- Posts: 1,754
Re: [SOLVED] [JOSM] Query works in OverpassTurbo, but fails in JOSM
The method mmd describes will also only load the data defined by the Overpass Query. You do not have to load any other data with JOSM in that case.
Offline
#5 2017-08-19 12:01:10
- mmd
- Member
- Registered: 2010-11-06
- Posts: 2,150
Re: [SOLVED] [JOSM] Query works in OverpassTurbo, but fails in JOSM
I agree, but I needed to download a subset of the data from OSM, not everything in a given area, hence my using a query to Overpass.
Maybe not clear enough, "Export --> load data into an OSM editor: JOSM" refers to overpass turbo, not openstreetmap.org. Hence, JOSM will download exactly the same data as you get in overpass turbo via your query. in fact, your Overpass query will be transferred to JOSM and run again on the JOSM side.
Please also check the overpass turbo documentation for further details: http://wiki.openstreetmap.org/wiki/Over … ng_Results
Last edited by mmd (2017-08-19 12:04:51)
Offline