Examples of DateRangeTreeSet


Examples of org.geotools.coverage.io.util.DateRangeTreeSet

            Date startTime;
            try {
                startTime = adaptee.getMinimum();
                Date endTime =  adaptee.getMaximum();
                final DateRange global = new DateRange(startTime, endTime);
                final SortedSet<DateRange> globalTemporalExtent = new DateRangeTreeSet();
                globalTemporalExtent.add(global);
                return globalTemporalExtent;
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

Examples of org.geotools.coverage.io.util.DateRangeTreeSet

        CoordinateReferenceSystem crs = source.getCoordinateReferenceSystem();
        Rectangle rasterArea = new Rectangle(0, 0, 10, 10);
        Hints hints = new Hints();
        String handle = "test_handle";
        DateRange range = new DateRange(new Date(10000), new Date(20000));
        DateRangeTreeSet set = new DateRangeTreeSet();
        set.add(range);
        Filter filter = Filter.INCLUDE;
        MathTransform2D gridToWorldTransform = new AffineTransform2D(
                AffineTransform.getTranslateInstance(0, 0));
        Set<NumberRange<Double>> verticalSubset = new HashSet<NumberRange<Double>>();
        verticalSubset.add(new NumberRange<Double>(Double.class, 0.0d, 10000.0d));
View Full Code Here

Examples of org.geotools.coverage.io.util.DateRangeTreeSet

        }

        @Override
        public SortedSet<? extends DateRange> getTemporalElements(boolean overall,
                ProgressListener listener) throws IOException {
            return new DateRangeTreeSet(dates);
        }
View Full Code Here

Examples of org.geotools.coverage.io.util.DateRangeTreeSet

            if (value == null) {
                return;
            }
            final List<?> dates = (List<?>) value;
            if (dates != null && !dates.isEmpty()) {
                SortedSet<DateRange> requestedTemporalSubset = new DateRangeTreeSet();
                for (Object val : dates) {
                    if (val instanceof Date) {
                        requestedTemporalSubset.add(new DateRange((Date) val, (Date) val));
                    } else if (val instanceof DateRange) {
                        requestedTemporalSubset.add((DateRange)val);
                    }
                }
               
                // TODO IMPROVE THAT TO DEAL ON RANGES
                request.setTemporalSubset(requestedTemporalSubset);
View Full Code Here

Examples of org.geotools.coverage.io.util.DateRangeTreeSet

                            requestedVerticalSubset.add(level);
                        }
                    }
                    readRequest.setVerticalSubset(requestedVerticalSubset);

                    SortedSet<DateRange> requestedTemporalSubset = new DateRangeTreeSet();
                    SortedSet<? extends DateRange> temporalElements = temporalDomain.getTemporalElements(false, null);
                    final int numTimes = temporalElements.size();
                    Iterator<? extends DateRange> iteratorT = temporalElements.iterator();
                    for (int i = 0; i < numTimes; i++) {
                        DateRange time = iteratorT.next();
                        if (i % (numTimes / 5) == 1) {
                            requestedTemporalSubset.add(time);
                        }
                    }
                    readRequest.setTemporalSubset(requestedTemporalSubset);

                    CoverageResponse response = gridSource.read(readRequest, null);
View Full Code Here

Examples of org.geotools.coverage.io.util.DateRangeTreeSet

        SortedSet<DateRange> temporalSubset = request.getTemporalSubset();
        if (temporalDomain != null) {
            if (temporalSubset.isEmpty()) {
                Set<DateRange> temporalExtent = temporalDomain.getTemporalExtent();
                if (temporalExtent != null) {
                    temporalSubset = new DateRangeTreeSet(temporalExtent);
                }
                request.setTemporalSubset(temporalSubset);
            }   
        }
View Full Code Here

Examples of org.geotools.coverage.io.util.DateRangeTreeSet

    /**
     * @see org.geotools.coverage.io.CoverageReadRequest#getTemporalSubset()
     */
    public SortedSet<DateRange> getTemporalSubset() {
        if (temporalSubset == null) {
            temporalSubset = new DateRangeTreeSet();
        }
       
        return new DateRangeTreeSet(temporalSubset);
    }
View Full Code Here

Examples of org.geotools.coverage.io.util.DateRangeTreeSet

    /**
     * @see org.geotools.coverage.io.CoverageReadRequest#setTemporalSubset(java.util.SortedSet)
     */
    public void setTemporalSubset(SortedSet<DateRange> temporalSubset) {
        this.temporalSubset = new DateRangeTreeSet(temporalSubset);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.