tyrasd / overpass-turbo

A web based data mining tool for OpenStreetMap using the Overpass API.
https://overpass-turbo.eu
Other
891 stars 129 forks source link

Wizard should abort on unknown type, instead of silently ignoring #681

Closed mnalis closed 5 months ago

mnalis commented 5 months ago

E.g. when one types into wizard type:Way and segregated=no at https://overpass-turbo.eu/ following empty query is generated:

/*
This has been generated by the overpass-turbo wizard.
The original search was:
“type:Way and segregated=no”
*/
[out:json][timeout:25];
// gather results
(
);
// print results
out geom;

This is of course due to invalid case (should be type:way instead of type:Way, but shift was being held a little too long).

It is of course trivial to detect in this simple showcase, but in more complex query it creates hard-to-detect errors, as it silently ignores only part of the query (e.g. in (type:Way and segregated=no) or (type:way and highway=cycleway) it would only look for way["highway"="cycleway"], and for more complex queries the error might likely not even be detected).