Modify

Opened 5 years ago

Last modified 2 years ago

#19151 new defect

Wrong query generated by overpass query wizard

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

Description

What steps will reproduce the problem?

  1. Use wizard with type:relation and type=multipolygon and landuse!=* and "area:highway"!=*

What is the expected result?

Something equivalent to this
...
relation["type"="multipolygon"]["landuse"!~".*"]["area:highway"!~".*"];
...

What happens instead?

relation["type"="multipolygon"]["landuse!"]/*area:highway*/["!"];

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

I understand that the JOSM wizard uses different syntax but it is very hard to find out when there is no error message and you find the old query in the dialog history.

Build-Date:2020-04-25 11:49:05
Revision:16378
Is-Local-Build:true

Identification: JOSM/1.5 (16378 SVN en) Windows 10 64-Bit
OS Build number: Windows 10 Home 1903 (18362)
Memory Usage: 1591 MB / 3641 MB (394 MB allocated, but free)
Java version: 1.8.0_191-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080
VM arguments: [-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:55899, -ea, -Dfile.encoding=UTF-8]
Program arguments: [--debug]

Plugins:
+ OpeningHoursEditor (35414)
+ PolygonCutOut (v0.7)
+ apache-commons (35362)
+ buildings_tools (35405)
+ continuosDownload (91)
+ ejml (35313)
+ geotools (35169)
+ jaxb (35092)
+ jts (35122)
+ merge-overlap (35248)
+ o5m (35248)
+ opendata (35405)
+ pbf (35248)
+ poly (35248)
+ reverter (35409)
+ undelete (35405)
+ utilsplugin2 (35405)

Last errors/warnings:
- W: Unsupported match type class org.openstreetmap.josm.data.osm.search.SearchCompiler$Any: area:highway
- W: Unsupported match type class org.openstreetmap.josm.data.osm.search.SearchCompiler$Any: building
- W: Unsupported match type class org.openstreetmap.josm.data.osm.search.SearchCompiler$Any: building:part
- W: Unsupported match type class org.openstreetmap.josm.data.osm.search.SearchCompiler$Any: area:highway
- W: Unsupported match type class org.openstreetmap.josm.data.osm.search.SearchCompiler$Any: building
- W: Unsupported match type class org.openstreetmap.josm.data.osm.search.SearchCompiler$Any: building:part
- W: Unsupported match type class org.openstreetmap.josm.data.osm.search.SearchCompiler$Any: area:highway
- W: Unsupported match type class org.openstreetmap.josm.data.osm.search.SearchCompiler$Any: area:highway
- E: org.openstreetmap.josm.tools.UncheckedParseException: java.lang.UnsupportedOperationException: !area:highway. Cause: java.lang.UnsupportedOperationException: !area:highway
- W: Unsupported match type class org.openstreetmap.josm.data.osm.search.SearchCompiler$Any: area:highway

Attachments (0)

Change History (5)

comment:1 by mmd, 5 years ago

By the way, ["landuse"!~".*"] is the old-fashioned style. Assuming you have a different code line anyway, and intend to rework this part, better generate [!"landuse"] instead.

See https://github.com/tyrasd/overpass-wizard/issues/14

comment:2 by simon04, 5 years ago

Keywords: overpass query wizard added

The root cause for this behaviour is that for JOSM search and thus for the query wizard you cannot use x!=y, but you need to use -x=y. Basically the same as ##19115.

type:relation and type=multipolygon and -landuse=* and -"area:highway"=*
// →
relation["type"="multipolygon"][!"landuse"][!"area:highway"];
Last edited 5 years ago by simon04 (previous) (diff)

comment:3 by simon04, 5 years ago

In 16413/josm:

see #19151 - SearchCompilerQueryWizard: add unit test

in reply to:  2 comment:4 by gaben, 4 years ago

Replying to simon04:

The root cause for this behaviour is that for JOSM search and thus for the query wizard you cannot use x!=y, but you need to use -x=y.

see #17411

comment:5 by taylor.smock, 2 years ago

Ticket #20243 has been marked as a duplicate of this ticket.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to GerdP.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


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