Package org.geotools.feature.visitor

Examples of org.geotools.feature.visitor.MaxVisitor


            DimensionDefaultValueSelectionStrategy delegateStrategy, DimensionDescriptor dd) {
        String sa = dd.getStartAttribute();
        String ea = dd.getEndAttribute();
        if (delegateStrategy instanceof CoverageMaximumValueSelectionStrategyImpl) {
            if (ea != null) {
                return new MaxVisitor(ea);
            } else {
                return new MaxVisitor(sa);
            }
        } else if (delegateStrategy instanceof CoverageMinimumValueSelectionStrategyImpl) {
            return new MinVisitor(sa);
        } else if (delegateStrategy instanceof CoverageNearestValueSelectionStrategyImpl) {
            CoverageNearestValueSelectionStrategyImpl impl = (CoverageNearestValueSelectionStrategyImpl) delegateStrategy;
View Full Code Here


    }

    @Override
    public <T> T getDefaultValue(ResourceInfo resource, String dimensionName,
            DimensionInfo dimension, Class<T> clz) {
        final MaxVisitor max = new MaxVisitor(dimension.getAttribute());
        CalcResult res = getCalculatedResult((FeatureTypeInfo) resource, dimension, max);
        if (res.equals(CalcResult.NULL_RESULT)) {
            return null;
        } else {
            return Converters.convert(max.getMax(),clz);
        }
    }  
View Full Code Here

            collection.accepts(min, null);
            CalcResult minResult = min.getResult();
            // check calcresult first to avoid potential IllegalStateException if no features are in collection
            if (minResult != CalcResult.NULL_RESULT) {
                result.add((Date) min.getMin());
                final MaxVisitor max = new MaxVisitor(time.getAttribute());
                collection.accepts(max, null);
                result.add((Date) max.getMax());
            }
        }

        return result;
    }
View Full Code Here

            collection.accepts(min, null);
            // check calcresult first to avoid potential IllegalStateException if no features are in collection
            CalcResult calcResult = min.getResult();
            if (calcResult != CalcResult.NULL_RESULT) {
                result.add(((Number) min.getMin()).doubleValue());
                final MaxVisitor max = new MaxVisitor(elevation.getAttribute());
                collection.accepts(max, null);
                result.add(((Number) max.getMax()).doubleValue());
            }
        }

        return result;
    }
View Full Code Here

TOP

Related Classes of org.geotools.feature.visitor.MaxVisitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.