Package org.geotools.util

Examples of org.geotools.util.NullProgressListener


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

        // Final checks on the result
        Assert.assertNotNull(gml2Zip);

        File[] files = exctractGMLFile(gml2Zip);

        SimpleFeatureCollection rawTarget = (SimpleFeatureCollection) new WFSPPIO.WFS10()
                .decode(new FileInputStream(files[0]));

        Assert.assertNotNull(rawTarget);

        Assert.assertEquals(rawSource.size(), rawTarget.size());

        // Download as GML 3
        File gml3Zip = downloadProcess.execute(getLayerId(MockData.POLYGONS), // layerName
                null, // filter
                "application/wfs-collection-1.1", // outputFormat
                null, // targetCRS
                CRS.decode("EPSG:32615"), // roiCRS
                roi, // roi
                false, // cropToGeometry
                new NullProgressListener() // progressListener
                );

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


                "application/json", // outputFormat
                null, // targetCRS
                CRS.decode("EPSG:32615"), // roiCRS
                roi, // roi
                false, // cropToGeometry
                new NullProgressListener() // progressListener
                );
        // Final checks on the result
        Assert.assertNotNull(jsonZip);

        File[] files = exctractJSONFile(jsonZip);
View Full Code Here

                "image/tiff", // outputFormat
                null, // targetCRS
                CRS.decode("EPSG:4326", true), // roiCRS
                roi, // roi
                true, // cropToGeometry
                new NullProgressListener() // progressListener
                );

        // Final checks on the result
        Assert.assertNotNull(rasterZip);
        GeoTiffReader reader = null;
        GridCoverage2D gc = null, gcResampled = null;
        try {
            final File[] tiffFiles = extractTIFFFile(rasterZip);
            Assert.assertNotNull(tiffFiles);
            Assert.assertTrue(tiffFiles.length > 0);
            reader = new GeoTiffReader(tiffFiles[0]);
            gc = reader.read(null);

            Assert.assertNotNull(gc);

            Assert.assertEquals(-130.88669845369998,
                    gc.getEnvelope().getLowerCorner().getOrdinate(0), 1E-6);
            Assert.assertEquals(48.611129008700004, gc.getEnvelope().getLowerCorner()
                    .getOrdinate(1), 1E-6);
            Assert.assertEquals(-123.95304462109999,
                    gc.getEnvelope().getUpperCorner().getOrdinate(0), 1E-6);
            Assert.assertEquals(54.0861661371, gc.getEnvelope().getUpperCorner().getOrdinate(1),
                    1E-6);

        } finally {
            if (gc != null) {
                CoverageCleanerCallback.disposeCoverage(gc);
            }
            if (reader != null) {
                reader.dispose();
            }

            // clean up process
            resourceManager.finished(resourceManager.getExecutionId(true));
        }
        // Download the coverage as tiff (Reprojected)
        File resampledZip = downloadProcess.execute(getLayerId(MockData.USA_WORLDIMG), // layerName
                null, // filter
                "image/tiff", // outputFormat
                CRS.decode("EPSG:900913", true), // targetCRS
                CRS.decode("EPSG:900913", true), // roiCRS
                roiResampled, // roi
                true, // cropToGeometry
                new NullProgressListener() // progressListener
                );
        // Final checks on the result
        Assert.assertNotNull(resampledZip);

        try {
View Full Code Here

                "image/tiff", // outputFormat
                null, // targetCRS
                CRS.decode("EPSG:4326"), // roiCRS
                roi, // roi
                true, // cropToGeometry
                new NullProgressListener() // progressListener
                );

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

                    "image/tiff", // outputFormat
                    null, // targetCRS
                    CRS.decode("EPSG:4326", true), // roiCRS
                    roi, // roi
                    true, // cropToGeometry
                    new NullProgressListener() // progressListener
                    );
            Assert.assertFalse(true);
        } catch (ProcessException e) {
            Assert.assertEquals(
                    "java.lang.IllegalArgumentException: Download Limits Exceeded. Unable to proceed!: Download Limits Exceeded. Unable to proceed!",
View Full Code Here

                    "image/tiff", // outputFormat
                    null, // targetCRS
                    CRS.decode("EPSG:4326", true), // roiCRS
                    roi, // roi
                    true, // cropToGeometry
                    new NullProgressListener() // progressListener
                    );

            Assert.assertFalse(true);
        } catch (ProcessException e) {
            Assert.assertEquals(
View Full Code Here

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

            Assert.assertFalse(true);
        } catch (ProcessException e) {
            Assert.assertEquals(
View Full Code Here

                solrLayerConfiguration = new SolrLayerConfiguration(new ArrayList<SolrAttribute>());
                solrLayerConfiguration.setLayerName(ri.getName());
                ri.getMetadata().put(SolrLayerConfiguration.KEY, solrLayerConfiguration);
            }
            SolrDataStore dataStore = (SolrDataStore) ((DataStoreInfo) ri.getStore())
                    .getDataStore(new NullProgressListener());
            ArrayList<SolrAttribute> attributes = dataStore
                    .getSolrAttributes(solrLayerConfiguration.getLayerName());
            for (SolrAttribute at : attributes) {
                if (tempMap.containsKey(at.getName())) {
                    SolrAttribute prev = tempMap.get(at.getName());
View Full Code Here

            catalog.add(store);

            builder.setStore(store);

            // featuretyepinfo and layerinfo
            DataStore dataStore = (DataStore) store.getDataStore(new NullProgressListener());
            String featureTypeName = coverageName != null ? coverageName : storeName;
            SimpleFeatureSource featureSource = dataStore.getFeatureSource(featureTypeName);
            featureType = builder.buildFeatureType(featureSource);
            featureType.setName(layerName);
            featureType.setTitle(layerName);
View Full Code Here

          if (layerInfo != null) {
            ResourceInfo obj = layerInfo.getResource();
            /* Check if it's feature type or coverage */
            if (obj instanceof FeatureTypeInfo) {
              final FeatureType ftType = ((FeatureTypeInfo) obj).getFeatureType();
              final 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

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.