@Test public void testEvaluateNonNumericalWithPercentages() { Literal classes = ff.literal(3); PropertyName name = ff.property("foo"); Function func = ff.function("EqualInterval", name, classes, ff.literal(true)); Object classifier = func.evaluate(featureCollection); assertTrue(classifier instanceof RangedClassifier); RangedClassifier ranged = (RangedClassifier) classifier; double[] percentages = ranged.getPercentages(); assertEquals(3, percentages.length); assertEquals(62.5, percentages[0]); assertEquals(25.0, percentages[1]); assertEquals(12.5, percentages[2]); }
public RangedClassifier evaluate(Object object) { if (!(object instanceof FeatureCollection)) { return null; } return calculate((SimpleFeatureCollection) object); }
EqualIntervalFunction extends ClassificationFunction { public RangedClassifier evaluate(Object object) { if (!(object instanceof FeatureCollection)) { return null; } return calculate((SimpleFeatureCollection) object); } }
EqualIntervalFunction extends ClassificationFunction { public RangedClassifier evaluate(Object object) { if (!(object instanceof FeatureCollection)) { return null; } return calculate((SimpleFeatureCollection) object); } EqualIntervalFunction(); }
EqualIntervalFunction extends ClassificationFunction { public RangedClassifier evaluate(Object object) { if (!(object instanceof FeatureCollection)) { return null; } return calculate((SimpleFeatureCollection) object); } EqualIntervalFunction(); RangedClassifier evaluate(Object object); }
EqualIntervalFunction extends ClassificationFunction { public RangedClassifier evaluate(Object object) { if (!(object instanceof FeatureCollection)) { return null; } return calculate((SimpleFeatureCollection) object); } EqualIntervalFunction(); RangedClassifier evaluate(Object object); static FunctionName NAME; }