Package org.geotools.util

Examples of org.geotools.util.NullProgressListener


                    }
                }
                try{
                    // check the #of requested values
                    // get the read parameters for this reader
                    final GridCoverageReader gridCoverageReader = cInfo.getGridCoverageReader(new NullProgressListener(), GeoTools.getDefaultHints());
                    final Set<ParameterDescriptor<List>> dynamicParameters = ((GridCoverage2DReader)gridCoverageReader).getDynamicParameters();
                    if(dynamicParameters.isEmpty()){
                        throw new IllegalStateException("Layer "+cInfo.getTitle()+ " has no additional dimensions which are required for an EO BANDS layer");
                    }
                    final Set<ReferenceIdentifier> dynamicParametersNames= new HashSet<ReferenceIdentifier>();
View Full Code Here


            CoverageInfo coverageInfo = mli.getCoverage();
            // it much safer to wrap a reader rather than a coverage in most cases, OOM can
            // occur otherwise
            final GridCoverage2DReader reader;
            reader = (GridCoverage2DReader) coverageInfo.getGridCoverageReader(
                    new NullProgressListener(), GeoTools.getDefaultHints());
            final SimpleFeatureCollection feature;
            feature = FeatureUtilities.wrapGridCoverageReader(reader, null);
            return feature.getSchema();
        }
        return null;
View Full Code Here

        final Catalog catalog = getCatalog();

        DataAccess<? extends FeatureType, ? extends Feature> dataStore;
        try {
            // REVISIT: this may need to be done after saveing the DataStoreInfo
            dataStore = info.getDataStore(new NullProgressListener());
            dataStore.dispose();
        } catch (IOException e) {
            LOGGER.log(Level.WARNING, "Error obtaining new data store", e);
            String message = e.getMessage();
            if (message == null && e.getCause() != null) {
View Full Code Here

    public List<FeatureCollection> identify(FeatureInfoRequestParameters params, int maxFeatures) throws Exception {
        final MapLayerInfo layer = params.getLayer();
        final Filter filter = params.getFilter();
        final CoverageInfo cinfo = layer.getCoverage();
        final GridCoverage2DReader reader = (GridCoverage2DReader) cinfo
                .getGridCoverageReader(new NullProgressListener(),
                        GeoTools.getDefaultHints());
       
       
        // set the requested position in model space for this request
        final Coordinate middle = WMS.pixelToWorld(params.getX(), params.getY(), params.getRequestedBounds(), params.getWidth(), params.getHeight());
View Full Code Here

    public void accepts(org.opengis.feature.FeatureVisitor visitor,
            org.opengis.util.ProgressListener progress) {
        Iterator<F> iterator = null;
        if (progress == null)
            progress = new NullProgressListener();
        try {
            float size = size();
            float position = 0;
            progress.started();
            for (iterator = iterator(); !progress.isCanceled() && iterator.hasNext();) {
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 GridCoverage2D gc = extractCoverageSubset();

        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

                        requestedCRS, width, height, bbox, ff, results, i, layer, rules, maxFeatures);

            } else if (layer.getType() == MapLayerInfo.TYPE_RASTER) {
                final CoverageInfo cinfo = requestedLayers.get(i).getCoverage();
                final AbstractGridCoverage2DReader reader = (AbstractGridCoverage2DReader) cinfo
                        .getGridCoverageReader(new NullProgressListener(),
                                GeoTools.getDefaultHints());
               
               
                // get the original grid geometry
                final GridGeometry2D coverageGeometry = (GridGeometry2D) cinfo.getGrid();
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.