Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(if: .... ) - metadata checks #367

Closed
mmd-osm opened this issue Mar 6, 2017 · 5 comments
Closed

(if: .... ) - metadata checks #367

mmd-osm opened this issue Mar 6, 2017 · 5 comments

Comments

@mmd-osm
Copy link
Contributor

mmd-osm commented Mar 6, 2017

Note: I moved this topic over from #345, where it got lost a bit in the overall test results.

Meta data checks missing

Somehow, meta data checks seem to be missing: we only provide relevant functionality via the (newer: ) filter today, although that could be easily extended to changeset id, object id and version. What's missing here is all the operator logic, in place for (if:. In a way, the new (if: filter doesn't yet fit perfectly into the existing filters, or I should say, some of the existing filters would probably benefit from being lifted into (if:, while at the same time, the whole new filter concept then doesn't need to be called (if: anymore.

As an example: construction sites, which are older than 2 years. The current way of expressing this is way too complicated. Something like @timestamp < '2015-01-01T00:00:00Z would be a massive improvement.

[out:json][timeout:25];
(
  // query part for: “landuse=construction and newer:365days”
  node["landuse"="construction"](newer:"{{date:365days}}")({{bbox}});
  way["landuse"="construction"](newer:"{{date:365days}}")({{bbox}});
  relation["landuse"="construction"](newer:"{{date:365days}}")({{bbox}});
)->.neuere;
(
// query part for: “landuse=construction and newer:3years”
  node["landuse"="construction"](newer:"{{date:3years}}")({{bbox}});
  way["landuse"="construction"](newer:"{{date:3years}}")({{bbox}});
  relation["landuse"="construction"](newer:"{{date:3year}}")({{bbox}});
)->.aeltere;
( .aeltere; - .neuere; );
// print results
out body;
>;
out skel qt;
@pierzen
Copy link

pierzen commented Mar 22, 2017

While the Newer parameter tells us objects edited, we can also query the Adiff data for objects created before a certain date.

Adding more possibilities to filter from the metadata also offer significative enhancements for Monitoring edits for a specific territory, a Mapathon, etc. Other then id, object id and version, it would be interesting to offer more possibilities to filter from uid, user (user name) and changeset comment (suggested in #189).

Below, I provide other examples where metadata could be used to filter the Adiff data.

  • select a hashtag on the changeset comment would let select for a specific project.
  • user : select user names that contain a substr. For example, query for osm partner organizations that make specific changes to the map. They often use a prefix that identify each of their contributor (ie. xx10, xx11 ...)
  • uid : osm user id > nb (we can find id for a date), would let query the new contributors from a certain date.
  • list of uid or user (Multiple id query (id: ) #358 not yet committed) could let follow a team membes, training session or mapathon participants.

@mmd-osm
Copy link
Contributor Author

mmd-osm commented Mar 23, 2017

@pierzen : Changeset comments are not part of the usual diff files and not part of the Overpass database at this time. Roland marked a respective issue as invalid (#361), which I interpret as a 'this is not going to happen at all'.

Maybe openstreetmap/openstreetmap-website#1500 would be better suited for this.

Regarding users: you could already provide a dedicated list of user names as of today: node(user: teammember1, teammember2, teammember3)... - or user ids node(uid:1234,2345,3456). This has been rolled out last year as part of version 0.7.53 already.
Issue #358 is covering e.g. a list of node ids.

@mmd-osm
Copy link
Contributor Author

mmd-osm commented May 19, 2017

Implemented in #219

@polarbearing
Copy link

thanks @tyrasd for referring my issue upstream into here.
Indeed making numeric comparisons against the user id would be quite helpful e.g. when checking for sock puppets created by blocked users, based on the assumption that new uids are created with increasing numbers, e.g. to have a statement like number([uid:]) > 1000000. Probably also good for the object id:

@mmd-osm
Copy link
Contributor Author

mmd-osm commented Jul 21, 2017

@polarbearing : uid() and id() have already been implemented. They will be available on overpass-api.de with the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants