OpenStreetMap logo OpenStreetMap

un1matr1x's Diary

Recent diary entries

check for Stages of decay

Posted by un1matr1x on 29 December 2023 in English.

Based on a coincidence, I used Overpass in my area to try to identify objects marked for removal that are older than period X. Unfortunately, I didn’t manage it so easily and at the same time had the idea whether it wouldn’t be better to check this on site via street complete. In the course of the GitHub issue, however, it turned out that it doesn’t really fit the core of Street Complete.

So back to Overpass and the good old query in advance to be able to check it later on site. With the help of other OSM users on Telegram, the following query was created, which can be easily customized:

https://overpass-turbo.eu/s/1Fml

To be on the safe side, the overpass query is shown here as code:

//Check for Stages of decay
//based on the idea of:
//https://github.com/streetcomplete/StreetComplete/issues/5402

[out:json][bbox:{{bbox}}][timeout:800];
//gather informations about non-excisiting objects
//and store the data as "gone"
(
  nw[~"^demolished:.*$"~"."];
  nw[~"^razed:.*$"~"."];
  nw[~"^removed:.*$"~"."];
  nw[~"^destroyed:.*$"~"."];
)->.gone;

//substract any gone-object, that was last modified
//within the last X years
(.gone; - nwr.gone(newer:"{{date:1year}}"););

out geom;