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

make typeFilter accept arbitrary sets of OSMType #157

Merged
merged 7 commits into from
Mar 6, 2020

Conversation

tyrasd
Copy link
Member

@tyrasd tyrasd commented Apr 12, 2019

This changes osm-type filters to

  • make them work the same as the other filters (i.e. when called multiple times, the filters are intersected together). technically this is a breaking change compared to how this worked
  • allow arbitrary set types to be supplied (not only EnumSets)
  • made jdbc backends work with "no osm type" cases. (e.g. .osmType(EnumSet.noneOf(OSMType.class))).
  • add unit tests

Checklist

@tyrasd tyrasd added enhancement New feature or request user experience Enhances the usability of OSHDB breaking This will introduce an incombability to previous versions. Documentation update compulsory labels Apr 12, 2019
@tyrasd tyrasd added the waiting for review This pull request needs a code review label Feb 26, 2020
@tyrasd tyrasd force-pushed the feature-typefiltersets branch from 9648659 to 9640719 Compare March 5, 2020 15:59
@tyrasd
Copy link
Member Author

tyrasd commented Mar 6, 2020

thanks for the review @FabiKo117. The only reason why I was still reluctant to merge this is that it technically did break the way the method .osmType works compared to the current (v0.5.5) version.

But, on the other hand, according to our documentation (https://github.com/GIScience/oshdb/blob/master/documentation/manual/filters.md) the current (v0.5.5) code is actually wrong because it states the following which is currently not the case for the osmType filter:

Multiple filters can be applied after each other. The result will then contain any OSM elements that match all of the specified filters.

I'm changing this to a bugfix (from a breaking change), if you're ok with that?!

@FabiKo117
Copy link
Contributor

I see.. from that point of view it is then actually a bugfix indeed.

@tyrasd tyrasd added bug Something isn't working as expected and removed breaking This will introduce an incombability to previous versions. Documentation update compulsory enhancement New feature or request user experience Enhances the usability of OSHDB waiting for review This pull request needs a code review labels Mar 6, 2020
@tyrasd tyrasd merged commit c01c46c into master Mar 6, 2020
@tyrasd tyrasd deleted the feature-typefiltersets branch March 6, 2020 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants