-
Notifications
You must be signed in to change notification settings - Fork 18
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
[oshdb-filter] allow filtering by changeset id and (optionally) contributor id #380
Conversation
fd3c79d
to
df7615e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A very nice PR. I think we should also include
ChangesetIdFilterEqualsAnyOf
ContributorUserIdFilterEqualsAnyOf
as well. They should be very quick to implemented as far as I see the code.
In my opinion it could be a quite common use-case that you got a list of changeset ids and/or contributor ids which you want to use in a filter as well.
oshdb-api/src/main/java/org/heigit/ohsome/oshdb/api/mapreducer/MapReducer.java
Outdated
Show resolved
Hide resolved
oshdb-api/src/main/java/org/heigit/ohsome/oshdb/api/mapreducer/MapReducer.java
Outdated
Show resolved
Hide resolved
oshdb-api/src/main/java/org/heigit/ohsome/oshdb/api/mapreducer/MapReducer.java
Outdated
Show resolved
Hide resolved
oshdb-api/src/main/java/org/heigit/ohsome/oshdb/api/object/package-info.java
Outdated
Show resolved
Hide resolved
oshdb-filter/src/main/java/org/heigit/ohsome/oshdb/filter/ChangesetIdFilterEquals.java
Outdated
Show resolved
Hide resolved
oshdb-filter/src/main/java/org/heigit/ohsome/oshdb/filter/ContributorUserIdFilterEquals.java
Outdated
Show resolved
Hide resolved
oshdb-filter/src/test/java/org/heigit/ohsome/oshdb/filter/ParseTest.java
Show resolved
Hide resolved
oshdb-api/src/main/java/org/heigit/ohsome/oshdb/api/mapreducer/MapAggregator.java
Outdated
Show resolved
Hide resolved
oshdb-api/src/main/java/org/heigit/ohsome/oshdb/api/mapreducer/MapAggregator.java
Outdated
Show resolved
Hide resolved
oshdb-filter/src/main/java/org/heigit/ohsome/oshdb/filter/FilterExpression.java
Outdated
Show resolved
Hide resolved
* check all possible cases for the "fallback" case for contribution view queries * add tests for changeset id and contributor user id filters
e8da0c9
to
3fa0cc1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- There are some code refactorings, changing interfaces to abstract classes, etc. Which we could discuss in PR [oshdb-filter] discussion for PR #380 refactor oshdb-filter #385.
- The
NegatableFilter
wrapping for ContributionType could be potentially wrong, see comment.
oshdb-filter/src/main/java/org/heigit/ohsome/oshdb/filter/IdRange.java
Outdated
Show resolved
Hide resolved
oshdb-filter/src/main/java/org/heigit/ohsome/oshdb/filter/TagFilterNotEquals.java
Show resolved
Hide resolved
oshdb-filter/src/main/java/org/heigit/ohsome/oshdb/filter/NegatableFilter.java
Show resolved
Hide resolved
oshdb-filter/src/main/java/org/heigit/ohsome/oshdb/filter/GeometryFilter.java
Show resolved
Hide resolved
oshdb-filter/src/main/java/org/heigit/ohsome/oshdb/filter/ChangesetIdFilterEquals.java
Show resolved
Hide resolved
Co-authored-by: Rafael Troilo <rafael.troilo@heigit.org>
Reason: They did not really fulfil a specific purpose because one can already "and" combine OSH+OSM filters by calling `.filter` twice, and the geometry callback filter basically just replicates the `.filter(Predicate)` anyway. Also the given documentation and examples were not in line with the actual behaviour when one would have negated the filter, so it in the end just confusing to use.
c8af432
to
9f8fecf
Compare
5e51a5c
to
d130193
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for this pr!
I added a minor suggested change.
oshdb-filter/src/test/java/org/heigit/ohsome/oshdb/filter/ApplyOSMGeometryTest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Rafael Troilo <rafael.troilo@heigit.org>
Description
This enhances the oshdb-filter module to be able to filter by osm contributions or osm entity snapshots.
This can be used to implement further filters, like these two new ones:
changeset: <id>
to filter contributions by changeset idcontributor: <id>
to filter contributions by user id (disabled by default, can be activated by creating a filter parser with the respective optional boolean flag enabled)Corresponding issue
Closes #358
todo
Checklist
I have adjusted the examples or created an issue in the corresponding repositoryI have adjusted the benchmark or created an issue in the corresponding repository