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?
- 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 , 5 years ago
follow-up: 4 comment:2 by , 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"];
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