Modify

Opened 14 months ago

Closed 14 months ago

Last modified 13 months ago

#23212 closed defect (fixed)

Wrong overpass query generated for "key:"

Reported by: gaben Owned by: team
Priority: normal Milestone: 23.11
Component: Core Version:
Keywords: template_report overpass query wizard Cc:

Description (last modified by gaben)

What steps will reproduce the problem?

  1. Open up the Overpass query wizard
  2. Type in name:
  3. Generate the query

What is the expected result?

For key query, it's enough to provide the key without tilde. See Overpass_API/Overpass_QL#Exists

[out:xml][timeout:90][bbox:{{bbox}}];
(
  nwr["name"];
);
(._;>;);
out meta;

What happens instead?

An invalid query generated:

[out:xml][timeout:90][bbox:{{bbox}}];
(
  nwr[~"name"~""];
);
(._;>;);
out meta;

Please provide any additional information below. Attach a screenshot if possible.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-09-26 14:10:25 +0200 (Tue, 26 Sep 2023)
Build-Date:2023-09-27 01:31:02
Revision:18846
Relative:URL: ^/trunk

Last errors/warnings:- 00079.440 E: Belső kiszolgálóhiba - <html>Az OSM szerver<br>'https://api.openstreetmap.org/api/0.6/'<br>belső szerverhibát jelentett.<br>Ez valószínűleg átmeneti probléma. Kérlek, próbáld újra később.</html>

Attachments (0)

Change History (7)

comment:1 by gaben, 14 months ago

Description: modified (diff)

comment:2 by gaben, 14 months ago

Description: modified (diff)

comment:3 by gaben, 14 months ago

Description: modified (diff)

add wiki link

comment:4 by taylor.smock, 14 months ago

Resolution: fixed
Status: newclosed

In 18847/josm:

Fix #23212: Overpass query wizard should transform key: to ["key"] instead of [~"key"~""]

This is fixed by using ExactKeyValue instead of KeyValue for key: queries.
As a happy side effect, this significantly reduces the cost of key: queries.
In a test area ("Mesa County, Colorado"), this reduces the cpu time from 2600ms
to 200ms and reduces memory allocations from 425mb to effectively 0 for a name:
query.

In addition, this simplifies many equals methods by converting the following
pattern to Objects.equals(first, second):

if (first == null) {
    if (second != null) {
        return true;
    }
} else if (!first.equals(second))
    return false;
return true;

There are some additional changes, mostly related to documentation and lint
issues.

comment:5 by taylor.smock, 14 months ago

Milestone: 23.10

comment:6 by gaben, 14 months ago

That was quick, thank you!

comment:7 by taylor.smock, 13 months ago

Milestone: 23.1023.11

Ticket retargeted after milestone deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.