oshdb
oshdb copied to clipboard
Add getters to MapReducer/MapAggregator
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
related: https://gitlab.gistools.geog.uni-heidelberg.de/giscience/big-data/ohsome/oshdb/issues/91
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
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.
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?
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.