#11975 closed enhancement (fixed)
[Patch] Support Extended Overpass Turbo Queries
Reported by: | naoliv | Owned by: | simon04 |
---|---|---|---|
Priority: | normal | Milestone: | 16.10 |
Component: | Core | Version: | |
Keywords: | overpass turbo geocodeArea | Cc: |
Description
Building this query aeroway=* in "são paulo, brazil"
we have:
[timeout:25]; // fetch area “são paulo, brazil” to search in {{geocodeArea:são paulo, brazil}}->.searchArea; // gather results ( // query part for: “aeroway=*” node["aeroway"](area.searchArea); way["aeroway"](area.searchArea); relation["aeroway"](area.searchArea); ); // print results out meta; >; out meta;
Note that we are using a geocodeArea
area here.
But JOSM still uses a bbox when querying the API server:
INFO: GET http://overpass-api.de/api/interpreter?data=%5Bbbox%5D%5Btimeout%3A25%5D%3B%0A%2F%2F+fetch+area+%E2%80%9Cs%C3%A3o+paulo%2C+brazil%E2%80%9D+to+search+in%0A%7B%7BgeocodeArea%3As%C3%A3o+paulo%2C+brazil%7D%7D-%3E.searchArea%3B%0A%2F%2F+gather+results%0A%28%0A++%2F%2F+query+part+for%3A+%E2%80%9Caeroway%3D*%E2%80%9D%0A++node%5B%22aeroway%22%5D%28area.searchArea%29%3B%0A++way%5B%22aeroway%22%5D%28area.searchArea%29%3B%0A++relation%5B%22aeroway%22%5D%28area.searchArea%29%3B%0A%29%3B%0A%2F%2F+print+results%0Aout+meta%3B%0A%3E%3B%0Aout+meta%3B&bbox=-50.4103322,-22.6399923,-50.4057894,-22.6367102 ERRO: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400 org.openstreetmap.josm.io.OsmApiException: ResponseCode=400 at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:194) at org.openstreetmap.josm.io.OverpassDownloadReader.getInputStreamRaw(OverpassDownloadReader.java:92) at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:104) at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:68) at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:51) at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:166) at org.openstreetmap.josm.io.OverpassDownloadReader.parseOsm(OverpassDownloadReader.java:132) at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.parseDataSet(DownloadOsmTask.java:306) at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.realRun(DownloadOsmTask.java:314) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:93) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:161) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
JOSM:
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2015-10-15 01:32:10 Last Changed Author: Don-vip Revision: 8882 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Relative URL: ^/trunk URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2015-10-15 01:02:36 +0200 (Thu, 15 Oct 2015) Last Changed Rev: 8882 Identification: JOSM/1.5 (8882 pt_BR) Linux Debian GNU/Linux testing (stretch) Memory Usage: 439 MB / 9102 MB (120 MB allocated, but free) Java version: 1.7.0_85, Oracle Corporation, OpenJDK 64-Bit Server VM Java package: openjdk-7-jre:amd64-7u85-2.6.1-3 VM arguments: [-Dawt.useSystemAAFontSettings=on]
Attachments (2)
Change History (17)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Keywords: | overpass turbo geocodeArea added |
---|
comment:3 by , 9 years ago
Here's the documentation of the extended query syntax used by overpass turbo.
comment:4 by , 9 years ago
Summary: | Should not use bbox when using geocodeArea in overpass → Support Extended Overpass Turbo Queries |
---|---|
Type: | defect → enhancement |
by , 8 years ago
Attachment: | 0001-Extract-NameFinder-for-Nominatim-queries.patch added |
---|
by , 8 years ago
Attachment: | 0002-Evaluate-extended-Overpass-querty-geocodeArea.patch added |
---|
comment:7 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Summary: | Support Extended Overpass Turbo Queries → [Patch] Support Extended Overpass Turbo Queries |
With all the dependencies, integrating expand.js
seems more complicated than evaluating geocodeArea
in Java. With the patches attached, only geocodeArea
is evaluated.
comment:9 by , 8 years ago
I'd like to see it merged in the incoming next release, is there a specific reason why this patch has not been applied yet?
comment:10 by , 8 years ago
Milestone: | 16.08 → 16.09 |
---|
comment:11 by , 8 years ago
I wanted to rewrite attachment:0002-Evaluate-extended-Overpass-querty-geocodeArea.patch to do the Nominatim search when executing the download (and not invoking the wizard). This would do all IO stuff in the same process and allow copying queries from overpass-turbo.eu to the download dialog.
I haven't yet found the time to do this, though.
geocodeArea
is no Overpass construct, but an Overpass turbo construct, which performs a Nominatim search to obtain the bounds.