Package org.geotools.util

Examples of org.geotools.util.NullProgressListener


    }

    @Override
    public int getCoveragesNumber(ProgressListener listener) {
        if (listener == null)
            listener = new NullProgressListener();
        listener.started();
        try {
            return names.size();
        } finally {
            listener.complete();
View Full Code Here


    }

    @Override
    public List<Name> getNames(ProgressListener listener) {
        if (listener == null){
            listener = new NullProgressListener();
        }
        listener.started();
        try {
            return Collections.unmodifiableList(names);
        } finally {
View Full Code Here

          if (layerInfo != null) {
            ResourceInfo obj = layerInfo.getResource();
            /* Check if it's feature type or coverage */
            if (obj instanceof FeatureTypeInfo) {
              FeatureType ftType = ((FeatureTypeInfo) obj).getFeatureType();
              FeatureCollection ftCollection = ((FeatureTypeInfo) obj).getFeatureSource(new NullProgressListener(), null).getFeatures();
              List<Rule> rules = null;

              if ("equalInterval".equals(method)) {
                rules = builder.equalIntervalClassification(ftCollection, property, Integer.parseInt(intervals), Boolean.parseBoolean(open));
              } else if ("uniqueInterval".equals(method)) {
View Full Code Here

                    // it much safer to wrap a reader rather than a coverage in most cases, OOM can
                    // occur otherwise
                    final AbstractGridCoverage2DReader reader;
                    reader = (AbstractGridCoverage2DReader) coverageInfo.getGridCoverageReader(
                            new NullProgressListener(), GeoTools.getDefaultHints());
                    final SimpleFeatureCollection feature;
                    feature = FeatureUtilities.wrapGridCoverageReader(reader, null);
                    request.setLayer(feature.getSchema());
                }
            } catch (IOException e) {
View Full Code Here

    final double levels[] = new double[2];
    levels[0] = 1500;
    levels[1] = 1700;
    final ContourProcess process = new ContourProcess();
    final SimpleFeatureCollection fc = process.execute(gc, 0, levels, null,
        false, false, null, new NullProgressListener());

    assertNotNull(fc);
    assertTrue(fc.size() > 0);

    SimpleFeatureIterator fi = fc.features();
View Full Code Here

    final double step = 100;
    final ContourProcess process = new ContourProcess();
    final SimpleFeatureCollection fc = process.execute(gc, 0, null,
        Double.valueOf(step), false, false, null,
        new NullProgressListener());

    assertNotNull(fc);
    assertTrue(fc.size() > 0);

    SimpleFeatureIterator fi = fc.features();
View Full Code Here

        null,
        new ArrayList<Range>() {{
            add(new Range(0d,true, 1000d,false));
            add(new Range(1000d,true, 2000d,false));
        }},
        new NullProgressListener());
   

    assertNotNull(fc);
    assertTrue(fc.size() > 0);
View Full Code Here

        }

        EnumMap<AggregationFunction, Number> results = new EnumMap<AggregationFunction, Number>(AggregationFunction.class);
        if (singlePass != null && singlePass) {
            AggregateFeatureCalc calc = new AggregateFeatureCalc(visitors);
            features.accepts(calc, new NullProgressListener());
            List<CalcResult> resultList = (List<CalcResult>) calc.getResult().getValue();
            for (int i = 0; i < functionList.size(); i++) {
                CalcResult result = resultList.get(i);
                if(result != null) {
                    results.put(functionList.get(i), (Number) result.getValue());
                }
            }
        } else {
            for (int i = 0; i < functionList.size(); i++) {
                final FeatureCalc calc = visitors.get(i);
                features.accepts(calc, new NullProgressListener());
                results.put(functionList.get(i), (Number) calc.getResult().getValue());
            }
        }

        return new Results(results);
View Full Code Here

                "application/zip", // outputFormat
                null, // targetCRS
                CRS.decode("EPSG:32615"), // roiCRS
                roi, // roi
                false, // cropToGeometry
                new NullProgressListener() // progressListener
                );

        // Final checks on the result
        Assert.assertNotNull(shpeZip);
View Full Code Here

                "application/zip", // outputFormat
                null, // targetCRS
                DefaultGeographicCRS.WGS84, // roiCRS
                roi, // roi
                true, // cropToGeometry
                new NullProgressListener() // progressListener
                );

        // Final checks on the result
        Assert.assertNotNull(shpeZip);
View Full Code Here

TOP

Related Classes of org.geotools.util.NullProgressListener

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.