Ignore:
Timestamp:
2019-10-10T12:05:16+02:00 (5 years ago)
Author:
GerdP
Message:

see #18122: Don't set download bounds for incomplete Overpass queries
apply 18122-v1.patch so that Overpass queries don't set download bounds unless they are detected to return a complete result. For now, this is only detected when the user query is empty or just a comment.
TODO: This detection should also detect user written queries which return complete data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/download/OverpassDownloadSource.java

    r14418 r15447  
    5252 */
    5353public class OverpassDownloadSource implements DownloadSource<OverpassDownloadSource.OverpassDownloadData> {
     54    /** Overpass query to retrieve all nodes and related parent objects, */
     55    public static final String FULL_DOWNLOAD_QUERY = "[out:xml]; \n"
     56            + "(\n"
     57            + "    node({{bbox}});\n"
     58            + "<;\n"
     59            + ");\n"
     60            + "(._;>;);"
     61            + "out meta;";
    5462
    5563    @Override
     
    249257                        JOptionPane.YES_OPTION);
    250258                if (doFix) {
    251                     String repairedQuery = "[out:xml]; \n"
    252                             + query + "\n"
    253                             + "(\n"
    254                             + "    node({{bbox}});\n"
    255                             + "<;\n"
    256                             + ");\n"
    257                             + "(._;>;);"
    258                             + "out meta;";
    259                     this.overpassQuery.setText(repairedQuery);
     259                    this.overpassQuery.setText(FULL_DOWNLOAD_QUERY);
    260260                } else {
    261261                    return false;
Note: See TracChangeset for help on using the changeset viewer.