Package org.geotools.coverage.grid.io

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


    }

    private GridCoverage2D testReadFullLevel0(final RasterCellType cellType, final int numBands,
            final RasterCellType resultingCellType, final String fileNamePostFix) throws Exception {

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

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

        final int origWidth = originalGridRange.getSpan(0);
        final int origHeight = originalGridRange.getSpan(1);

        final GridCoverage2D coverage = readCoverage(reader, origWidth, origHeight,
View Full Code Here


    @Test
    public void tesReadOverlapsSampleRGBIamge() throws Exception {
        tableName = rasterTestData.getRasterTableName(RasterCellType.TYPE_8BIT_U, 3);
        rasterTestData.loadRGBRaster();
        final AbstractGridCoverage2DReader reader = getReader();
        assertNotNull(reader);

        final GeneralEnvelope originalEnvelope = reader.getOriginalEnvelope();

        final CoordinateReferenceSystem originalCrs = originalEnvelope
                .getCoordinateReferenceSystem();
        final GridEnvelope originalGridRange = reader.getOriginalGridRange();
        final int requestedWidth = originalGridRange.getSpan(0);
        final int requestedHeight = originalGridRange.getSpan(1);

        final GeneralEnvelope requestedEnvelope;
        final GridCoverage2D coverage;
View Full Code Here

    @Test
    public void tesReadOverlaps() throws Exception {
        tableName = rasterTestData.getRasterTableName(RasterCellType.TYPE_8BIT_U, 1);
        rasterTestData.loadTestRaster(tableName, 1, 100, 100, TYPE_8BIT_U, null, true, false,
                SeRaster.SE_INTERPOLATION_NEAREST, null);
        final AbstractGridCoverage2DReader reader = getReader();
        assertNotNull(reader);

        final GeneralEnvelope originalEnvelope = reader.getOriginalEnvelope();

        final CoordinateReferenceSystem originalCrs = originalEnvelope
                .getCoordinateReferenceSystem();
        final GridEnvelope originalGridRange = reader.getOriginalGridRange();
        final int requestedWidth = originalGridRange.getSpan(0);
        final int requestedHeight = originalGridRange.getSpan(1);

        final GeneralEnvelope requestedEnvelope;
        requestedEnvelope = new GeneralEnvelope(new ReferencedEnvelope(-100, 100, -100, 100,
View Full Code Here

    @Test
    public void tesReadNotOverlaps() throws Exception {
        tableName = rasterTestData.getRasterTableName(RasterCellType.TYPE_8BIT_U, 1);
        rasterTestData.loadTestRaster(tableName, 1, 100, 100, TYPE_8BIT_U, null, true, false,
                SeRaster.SE_INTERPOLATION_NEAREST, null);
        final AbstractGridCoverage2DReader reader = getReader();
        assertNotNull(reader);

        final GeneralEnvelope originalEnvelope = reader.getOriginalEnvelope();

        final CoordinateReferenceSystem originalCrs = originalEnvelope
                .getCoordinateReferenceSystem();
        final GridEnvelope originalGridRange = reader.getOriginalGridRange();
        final int requestedWidth = originalGridRange.getSpan(0);
        final int requestedHeight = originalGridRange.getSpan(1);

        final GeneralEnvelope nonOverlappingEnvelope;
        nonOverlappingEnvelope = new GeneralEnvelope(new ReferencedEnvelope(300, 500, 300, 500,
View Full Code Here

        final ArcSDERasterFormat format = new ArcSDERasterFormatFactory().createFormat();
        // we can't create statistics here so tell ArcSDERasterFormat not to fail
        format.setStatisticsMandatory(false);

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

    }

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

        final int count = 10;
        long time = 0;
        // warm up
View Full Code Here

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

        // http://localhost:8080/geoserver/wms?WIDTH=256&LAYERS=sde%3AIMG_USGSQUAD_SGBASE&STYLES=&SRS=EPSG%3A26986&HEIGHT=256&FORMAT=image%2Fjpeg&TILED=true&TILESORIGIN=169118.35%2C874964.388&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=239038.74625,916916.62575,253022.8255,930900.705

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

        final int reqWidth = 1000;// originalGridRange.getSpan(0) / 30;
        final int reqHeight = 447;//originalGridRange.getSpan(1) / 30;

View Full Code Here

    }

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

        System.out.println(reader.getInfo().getDescription());

        final GeneralEnvelope originalEnvelope = reader.getOriginalEnvelope();

        final int reqWidth = 225;
        final int reqHeight = 512;

        GeneralEnvelope reqEnvelope = originalEnvelope;
View Full Code Here

    @Test
    public void testReadIMG_USGSQUADM_Buggy() throws Exception {
        // http://localhost:8080/geoserver/wms?HEIGHT=500&WIDTH=1200&LAYERS=sde:IMG_USGSQUADM&STYLES=&SRS=EPSG%3A26986&FORMAT=image%2Fjpeg&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=253178.45971681,872419.13604732,253521.78247071,872562.18719478
        // http://arcy.opengeo.org:8080/geoserver/wms?SRS=EPSG%3A26986&WIDTH=950&STYLES=&HEIGHT=400&LAYERS=massgis%3ASDE.IMG_USGSQUADM&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=290557.15234375,932233.3984375,325347.19140625,946881.8359375
        tableName = "SDE.IMG_USGSQUADM";
        final AbstractGridCoverage2DReader reader = getReader();
        assertNotNull("Couldn't obtain a reader for " + tableName, reader);

        LOGGER.info("Original envelope: " + reader.getOriginalEnvelope());
        final GeneralEnvelope requestEnvelope = new GeneralEnvelope(reader.getOriginalEnvelope());
        requestEnvelope.setEnvelope(32168.0, 773720.0, 333224.0, 962136.0);
        final int reqWidth = 294;
        final int reqHeight =184;

        //requestEnvelope.setEnvelope(33000.0, 774000.0, 333002.0, 962000.0);
View Full Code Here

        for (int t = 0; t < threads; t++) {
            tasks.add(new Callable<Object>() {
                public Object call() throws Exception {
                    try {

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

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

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

                        for (int i = 0; i < count; i++) {
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.