overpass-turbo
overpass-turbo copied to clipboard
New operators for wizard: not, older:, meta
or
could be very useful because currently one can't negate a whole expression in parenthesis, older:
as a counterpart to newer:
, and meta
(setting out meta
in the resultant query) for edit review, as I do for my local area.
My usecase for older
- I am trying to simplify query that detects highway=construction that were not modified in a long time among one of filters (as part of https://github.com/westnordost/StreetComplete/pull/920 ).
http://overpass-turbo.eu/s/wVx attempt failed as while way[highway=construction](newer: '2017-06-16T00:00:00Z')
works, there is no simple way to apply an an opposite filter.
In the forthcoming release 0.7.55 you can express older by using the timestamp()
function:
[date:"2017-06-30T00:00:00Z"]
[bbox:47.80952,12.0973,47.81005,12.09801];
way[highway=construction][!fixme]
(if: timestamp() <= date('2016-06-16T00:00:00Z') &&
(!is_date(t['opening_date']) ||
date(t['opening_date']) < date('2017-06-16T00:00:00Z')));
out meta geom;