oshdb icon indicating copy to clipboard operation
oshdb copied to clipboard

Add getters to MapReducer/MapAggregator

Open SlowMo24 opened this issue 5 years ago • 5 comments

opened by @franz-benjamin with title mapReducer.getTimestamps

It would be nice to have mapReducer.getTimestamps(), mapReducer.getAreaOfInterest(), etc.

see https://gitlab.gistools.geog.uni-heidelberg.de/giscience/big-data/ohsome/oshdb/issues/150

SlowMo24 avatar Mar 07 '19 16:03 SlowMo24

related: https://gitlab.gistools.geog.uni-heidelberg.de/giscience/big-data/ohsome/oshdb/issues/91

SlowMo24 avatar Mar 07 '19 16:03 SlowMo24

closing as nice-to-have. this information is set by the user so it would only be useful in a situation where she does not know, what she is doing

SlowMo24 avatar Mar 07 '19 16:03 SlowMo24

These two tickets are not related. And yes, there are situations where you do not know which information has been set before. This is why we requested these methods. We have a use case and having these methods would make life much easer.

mocnik-science avatar Mar 07 '19 16:03 mocnik-science

The linked issue requests a string representation of the current settings (state) of a mapreducer-object. if they are not related I think we need more information on what exactly is requested. Maybe share the use case?

SlowMo24 avatar Mar 07 '19 16:03 SlowMo24

A toString method is not necessarily a good representation of all aspects of an object. A toString method is meant to identify an object while the request here is to ‘get back’ some information already set in before. The purpose is a different one. This is why I do not see a strong relation between these two requests.

The use case is roughly as follows. A mapReducer object is created and parameters are set. It is then passed to a method for computing something (like a quality measure). This method might need to access information that has been set before. The mapReducer object should disclose which information it already contains. Passing this information manually to this method in parallel to the mapReducer object could lead to passing two different (potentially also contradicting) pieces of information to the method, which should never be possible.

mocnik-science avatar Mar 07 '19 16:03 mocnik-science