//TODO: create a seperate builder / factory if this gets out of hand
        public static FeatureCoverage GetTimeDependentFeatureCoverage <T>() where T : IFeature
        {
            var featureCoverage = new FeatureCoverage();

            featureCoverage.Components.Add(new Variable <double>("value")
            {
                NoDataValue = double.NaN
            });
            var timeVariable = new Variable <DateTime>("time");

            featureCoverage.Arguments.Add(timeVariable);
            featureCoverage.Arguments.Add(new Variable <T>("feature"));
            return(featureCoverage);
        }
Beispiel #2
0
        public new virtual IFeatureCoverage Filter(params IVariableFilter[] filters)
        {
            var filteredCoverage = new FeatureCoverage()
            {
                Parent = this, Filters = filters
            };

            foreach (IVariable arg in Arguments)
            {
                filteredCoverage.Arguments.Add(arg.Filter(filters));
            }

            foreach (IVariable comp in Components)
            {
                filteredCoverage.Components.Add(comp.Filter(filters));
            }
            return(filteredCoverage);
        }