Reading-eScience-Centre / edal-java

Environmental Data Abstraction Layer libraries
Other
39 stars 30 forks source link

Remove "plotting" from edal-common #22

Closed letmaik closed 7 years ago

letmaik commented 9 years ago

The Dataset interface has methods like extractMapFeatures(Set<String> varIds, PlottingDomainParams params) which talk about plotting. I think this is too specific and can be made more generic at this place. Someone may want to extract/filter features not for plotting but for data analysis.

I saw in some implementations (don't remember which class) that these methods apply things like filtering with a small border around the bounding box, which is really meant for plotting. Such specific things should go into edal-graphics or similar and the API of Dataset should provide clear semantics on what you can do and what you will get. E.g. I don't like things such as The PlottingDomainParams object describing the domain to be plotted. The exact manner these are interpreted may depend on the type of DiscreteFeature returned. This makes it more or less useless outside plotting. Even within plotting if you need more control.

EDIT: The edal.domain.MapDomain and edal.feature.MapFeature also seem to belong to that.

jonblower commented 9 years ago

I tend to agree - I have never been particularly keen on PlottingDomainParams although I understand the logic behind them. Maybe we could discuss.

guygriffiths commented 7 years ago

PlottingDomainParams is still a thing, but it only comes in at the graphics level now - all of the methods in edal-common use the appropriate parameters for extraction. I did this a while ago, but I've just cleaned up the javadocs which still had a few (dead) links to it.