Open letmaik opened 9 years ago
There are a bunch of methods for extracting features from Datasets already in edal-common, as well as extracting MapFeatures from GridFeatures (i.e. regridding to a 2D layer at a specific time/depth). I'm not sure it needs a separate module.
Last time I looked at it I couldn't use it because it was too focused on map generation, with things like added buffers/margins around the extracted subsets. If those things go away and are instead put into the WMS part only, then it would be fine.
OK, the buffers only apply to Datasets with a continuous domain and it will be pretty straightforward to move that to the WMS-only code. I should get around to that some point today.
I've just moved the code that did this from AbstractContinuousDomainDataset to ColouredGlyphLayer. i.e. it no longer happens at the dataset level, but only on the image layer which needs it.
This is in the develop branch and I've pushed it to gh
Ok looks good. One last thing, the name "PlottingDomainParams" doesn't make too much sense in this generic context. What it is is basically a subsetting/resampling specification. It's not specifically related to plotting. Maybe that could be renamed to something else. Any suggestions?
On 18/11/2015 12:02, Guy Griffiths wrote:
I've just moved the code that did this from AbstractContinuousDomainDataset to ColouredGlyphLayer. i.e. it no longer happens at the dataset level, but only on the image layer which needs it.
— Reply to this email directly or view it on GitHub https://github.com/Reading-eScience-Centre/edal-java/issues/38#issuecomment-157690635.
(Subset|Extraction|Resample)(Domain)?Param(s|eters)
Hm, if I understand it right, then the .extract*() methods only filter out features from a dataset. The methods don't actually resample anything, which then confuses me slightly since the PlottingDomainParams currently includes a width/height which clearly is meant for resampling.
Which method would you use for getting a resampled grid feature that you then draw on a map?
extractMapFeatures()
For datasets with a continuous horizontal domain (e.g.the EN3/4 datasets) this filters out all of the features (e.g. PointSeriesFeature or ProfileFeatures) and then extracts PointFeatures from them at the correct depth/time.
For gridded datasets it resamples onto the provided grid.
Ok, so there is limited support for subsetting purely focused on map generation, right? I currently cannot give EDAL a grid feature and ask it to subset and resample to a certain bounding box. I can maybe do it indirectly somehow, but the operations are defined on a dataset and on variables. Or similarly subset a Profile to some vertical range, or a time series to a time range, and not just a single target coordinate.
Kind of. GridFeature has its own extractMapFeature() method to extract a 2D horizontal feature onto a given grid (it takes a Set of variable IDs, a target grid, an elevation value, and a time value), but none of the other feature types have a similar method. I can't remember why I implemented it for GridFeature - it's not currently used anywhere.
Ok, let's postpone that then, seems to be a bigger effort. In edal-json I wrote my own hacky code to do the subsetting and filtering (no resampling) on some feature types. But it would be nice if this is somehow directly supported in edal or via some external library, like.... edal-transform or whatever.
On 18/11/2015 15:50, Guy Griffiths wrote:
Kind of. GridFeature has its own extractMapFeature() method to extract a 2D horizontal feature onto a given grid (it takes a Set of variable IDs, a target grid, an elevation value, and a time value), but none of the other feature types have a similar method. I can't remember why I implemented it for GridFeature - it's not currently used anywhere.
— Reply to this email directly or view it on GitHub https://github.com/Reading-eScience-Centre/edal-java/issues/38#issuecomment-157756018.
As discussed in https://github.com/Reading-eScience-Centre/edal-java/issues/37 the WMS code of EDAL will generate new Feature instances of the map extent with the right CRS and resolution. Since these are useful operations outside of WMS map generation, it would make sense to generalize that to an EDAL subsetting/resampling module. This could then be used in projects like edal-json where you serve coverage data directly and not via WMS, and still want to support subsetting etc. How much refactoring/redesign work would that be?