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

OSHEntity Filter #274

Closed
SlowMo24 opened this issue Oct 30, 2020 · 4 comments
Closed

OSHEntity Filter #274

SlowMo24 opened this issue Oct 30, 2020 · 4 comments
Labels
question Further information is requested

Comments

@SlowMo24
Copy link
Contributor

Currently to get non-region-related contribution information (user specific (#170 ), changeset specific, object specific etc.) creates a large overhead of contribution objects, that are then only later filtered in the MapReduce-pipeline. Implementing GridOSHEntityand OSHEntityfilters would reduce computation and memory cost for e.g. user or object based analyses, especially when the area of interest is large.

Would partly address #254 .

@SlowMo24 SlowMo24 added the priority:high Should be addressed as soon as possible (next release) label Oct 30, 2020
@tyrasd tyrasd added question Further information is requested and removed priority:high Should be addressed as soon as possible (next release) labels Nov 3, 2020
@tyrasd
Copy link
Member

tyrasd commented Nov 3, 2020

I think #253 would solve this, actually, at least to some extent: It provides a more flexible method to inject more complex filters than what is currently possible (and IMHO a more elegant interface than to just provide more use-case specific filter methods): MapReducer::filter(FilterExpression f) allows to supply a filter expression object. It was meant to be used primarily with the ohsome filter library, but can be used standalone as well:

  ….filter(new Filter() {
      @Override
      public boolean applyOSM(OSMEntity entity) {
        return true;
      }

      @Override
      public boolean applyOSH(OSHEntity entity) {
        return setOfAllowedIds.contains(entity.getId());
      }

      @Override
      public FilterExpression negate() {
        return null;
      }
    })…

//edit: with something like https://gitlab.gistools.geog.uni-heidelberg.de/giscience/big-data/ohsome/libs/ohsome-filter/-/issues/14 this would be even more elegant:

  ….filter(Filter.byOSHEntity(entity -> setOfAllowedIds.contains(entity.getId())))…

@SlowMo24
Copy link
Contributor Author

SlowMo24 commented Nov 3, 2020

This sounds great 🎉 and #253 seems nearly finished (judging by the checkboxes). When will it get merged?

@tyrasd
Copy link
Member

tyrasd commented Nov 4, 2020

When will it get merged?

when ohsome-filter v1.4 is ready and published. could be soon

@rtroilo
Copy link
Member

rtroilo commented Nov 4, 2020

this is great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants