Package org.geotools.coverage.grid.io

Examples of org.geotools.coverage.grid.io.AbstractGridCoverage2DReader


    @Test
    public void testReadIMGCOQ_2005() throws Exception {
        tableName = "SDE.RASTER.IMG_COQ2005_CLIP_BOS";

        final AbstractGridCoverage2DReader reader = getReader();
        assertNotNull("Couldn't obtain a reader for " + tableName, reader);

        final GeneralEnvelope originalEnvelope = reader.getOriginalEnvelope();
        GridEnvelope originalGridRange = reader.getOriginalGridRange();

        final int reqWidth = originalGridRange.getSpan(0) / 2;
        final int reqHeight = originalGridRange.getSpan(1) / 2;

        Envelope reqEnvelope = originalEnvelope;
View Full Code Here


    @Test
    public void testIMG_WIND_SPD30M_ADAMS() throws Exception {
        tableName = "SDE.RASTER.IMG_WIND_SPD30M_ADAMS";

        final AbstractGridCoverage2DReader reader = getReader();
        assertNotNull("Couldn't obtain a reader for " + tableName, reader);

        final GeneralEnvelope originalEnvelope = reader.getOriginalEnvelope();
        GridEnvelope originalGridRange = reader.getOriginalGridRange();

        final int reqWidth = originalGridRange.getSpan(0);
        final int reqHeight = originalGridRange.getSpan(1);

        GeneralEnvelope reqEnvelope = originalEnvelope;
View Full Code Here

    @Test
    public void testReadNOAA_13006_1() throws Exception {
        tableName = "SDE.RASTER.NOAA_13006_1";

        final AbstractGridCoverage2DReader reader = getReader();
        assertNotNull("Couldn't obtain a reader for " + tableName, reader);

        final GeneralEnvelope originalEnvelope = reader.getOriginalEnvelope();

        final int reqWidth = 100;// 800;// originalGridRange.getSpan(0) / 8;
        final int reqHeight = 75;// 595;// originalGridRange.getSpan(1) / 8;

        GeneralEnvelope reqEnvelope = new GeneralEnvelope(new double[] { 274059, 837434 },
View Full Code Here

    }

    @Test
    public void testReadIMGCOQ_2001() throws Exception {
        tableName = "SDE.RASTER.IMG_COQ2001_CLIP_BOS_1";
        final AbstractGridCoverage2DReader reader = getReader();
        assertNotNull("Couldn't obtain a reader for " + tableName, reader);

        final GeneralEnvelope originalEnvelope = reader.getOriginalEnvelope();
        GridEnvelope originalGridRange = reader.getOriginalGridRange();

        final int reqWidth = originalGridRange.getSpan(0) / 4;
        final int reqHeight = originalGridRange.getSpan(1) / 4;

        Envelope reqEnvelope = originalEnvelope;
View Full Code Here

                + ";pool.minConnections=2;pool.maxConnections=2";
        // + config.getMinConnections() + ";pool.maxConnections=" + config.getMaxConnections();

        final ArcSDERasterFormat format = new ArcSDERasterFormatFactory().createFormat();

        AbstractGridCoverage2DReader reader = format.getReader(rgbUrl);
        return reader;
    }
View Full Code Here

                } else if (layerInfo.getType() == Type.RASTER) {
                    CoverageInfo coverageInfo = mli.getCoverage();

                    // 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());
View Full Code Here

            CoverageStoreInfo csinfo = ci.getStore();
           
            if(csinfo == null)
                throw new WcsException("Unable to acquire coverage store resource for coverage: " + ci.getName());
           
            AbstractGridCoverage2DReader reader = null;
            try {
                reader = (AbstractGridCoverage2DReader) ci.getGridCoverageReader(null, GeoTools.getDefaultHints());
            } catch (IOException e) {
                LOGGER.severe("Unable to acquire a reader for this coverage with format: " + csinfo.getFormat().getName());
            }
           
            if(reader == null)
                throw new WcsException("Unable to acquire a reader for this coverage with format: " + csinfo.getFormat().getName());

            final String[] metadataNames = reader.getMetadataNames();
           

            String timeMetadata = null;
            if (metadataNames != null && metadataNames.length > 0) {
                // TIME DIMENSION
                timeMetadata = reader.getMetadataValue("TIME_DOMAIN");
                               
            }

            if (referencedEnvelope != null) {
                AttributesImpl attributes = new AttributesImpl();
View Full Code Here

            CoverageStoreInfo csinfo = ci.getStore();
           
            if(csinfo == null)
                throw new WcsException("Unable to acquire coverage store resource for coverage: " + ci.getName());
           
            AbstractGridCoverage2DReader reader = null;
            try {
                reader = (AbstractGridCoverage2DReader) ci.getGridCoverageReader(null, GeoTools.getDefaultHints());
            } catch (IOException e) {
                LOGGER.severe("Unable to acquire a reader for this coverage with format: " + csinfo.getFormat().getName());
            }
           
            if(reader == null)
                throw new WcsException("Unable to acquire a reader for this coverage with format: " + csinfo.getFormat().getName());

            final String[] metadataNames = reader.getMetadataNames();
           
            if (metadataNames != null && metadataNames.length > 0) {
                // TIME DIMENSION
                timeMetadata = reader.getMetadataValue("TIME_DOMAIN");
               
               
            }

            start("wcs:domainSet");
View Full Code Here

           
            //
            // ELEVATION
            //
            // now get possible elevation
            AbstractGridCoverage2DReader reader = null;
            try {
                reader = (AbstractGridCoverage2DReader) ci.getGridCoverageReader(null, GeoTools.getDefaultHints());
            } catch (IOException e) {
                LOGGER.severe("Unable to acquire a reader for this coverage with format: " + ci.getStore().getFormat().getName());
            }           
            if(reader == null)
                throw new WcsException("Unable to acquire a reader for this coverage with format: " + ci.getStore().getFormat().getName());

            final String[] metadataNames = reader.getMetadataNames();
            String elevationMetadata=null;
            if (metadataNames != null && metadataNames.length > 0) {
                // TIME DIMENSION
                elevationMetadata = reader.getMetadataValue("ELEVATION_DOMAIN");
               
                start("wcs:AxisDescription");
                element("wcs:name", "ELEVATION");
                element("wcs:label", "ELEVATION");
                start("wcs:values");
View Full Code Here

                CoverageStoreInfo csinfo = cv.getStore();
               
                if(csinfo == null)
                    throw new WcsException("Unable to acquire coverage store resource for coverage: " + cv.getName());
               
                AbstractGridCoverage2DReader reader = null;
                try {
                    reader = (AbstractGridCoverage2DReader) catalog.getResourcePool().getGridCoverageReader(csinfo, GeoTools.getDefaultHints());
                } catch (IOException e) {
                    LOGGER.severe("Unable to acquire a reader for this coverage with format: " + csinfo.getFormat().getName());
                }
               
                if(reader == null)
                    throw new WcsException("Unable to acquire a reader for this coverage with format: " + csinfo.getFormat().getName());

                final String[] metadataNames = reader.getMetadataNames();
               
                if (metadataNames != null && metadataNames.length > 0) {
                    // TIME DIMENSION
                    timeMetadata = reader.getMetadataValue("TIME_DOMAIN");
                   
                }

                handleEnvelope(cv.getLatLonBoundingBox(), timeMetadata);
                handleKeywords(cv.getKeywords());
View Full Code Here

TOP

Related Classes of org.geotools.coverage.grid.io.AbstractGridCoverage2DReader

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.