Examples of InputCoverageBand


Examples of org.geoserver.catalog.CoverageView.InputCoverageBand

        // Creating the coverageView
        final Catalog catalog = getCatalog();
        final CoverageStoreInfo storeInfo = catalog.getCoverageStoreByName("watertemp");

        final InputCoverageBand band = new InputCoverageBand("watertemp", "0");
        final CoverageBand outputBand = new CoverageBand(Collections.singletonList(band), "watertemp@0",
                0, CompositionType.BAND_SELECT);
        final CoverageView coverageView = new CoverageView("waterView",
                Collections.singletonList(outputBand));
        final CatalogBuilder builder = new CatalogBuilder(catalog);
View Full Code Here

Examples of org.geoserver.catalog.CoverageView.InputCoverageBand

        final LayerInfo layerInfo = builder.buildLayer(coverageInfo);
        cat.add(layerInfo);
    }

    private void createCoverageView() throws Exception {
        final InputCoverageBand band_u = new InputCoverageBand("u-component_of_current_surface", "0");
        final CoverageBand outputBand_u = new CoverageBand(Collections.singletonList(band_u),
                "u-component_of_current_surface@0", 0, CompositionType.BAND_SELECT);

        final InputCoverageBand band_v = new InputCoverageBand("v-component_of_current_surface", "0");
        final CoverageBand outputBand_v = new CoverageBand(Collections.singletonList(band_v),
                "v-component_of_current_surface@0", 1, CompositionType.BAND_SELECT);
        final List<CoverageBand> coverageBands = new ArrayList<CoverageBand>(2);
        coverageBands.add(outputBand_u);
        coverageBands.add(outputBand_v);
View Full Code Here

Examples of org.geoserver.catalog.CoverageView.InputCoverageBand

        cat.add(layerInfo);
        setupRasterDimension("dummyView", ResourceInfo.TIME, DimensionPresentation.LIST, null);
    }

    private void createCoverageView() throws Exception {
        final InputCoverageBand band1 = new InputCoverageBand("NO2", "0");
        final CoverageBand outputBand1 = new CoverageBand(Collections.singletonList(band1),
                "NO2@0", 0, CompositionType.BAND_SELECT);

        final InputCoverageBand band2 = new InputCoverageBand("BrO", "0");
        final CoverageBand outputBand2 = new CoverageBand(Collections.singletonList(band2),
                "BrO@0", 1, CompositionType.BAND_SELECT);
        final List<CoverageBand> coverageBands = new ArrayList<CoverageBand>(2);
        coverageBands.add(outputBand1);
        coverageBands.add(outputBand2);
View Full Code Here

Examples of org.geoserver.catalog.CoverageView.InputCoverageBand

    @Test
    public void testCoverageView() throws Exception {
        final Catalog cat = getCatalog();
        final CoverageStoreInfo storeInfo = cat.getCoverageStoreByName("watertemp");

        final InputCoverageBand band = new InputCoverageBand("watertemp", "0");
        final CoverageBand outputBand = new CoverageBand(Collections.singletonList(band), "watertemp@0",
                0, CompositionType.BAND_SELECT);
        final CoverageView coverageView = new CoverageView("waterView",
                Collections.singletonList(outputBand));
        final CatalogBuilder builder = new CatalogBuilder(cat);
View Full Code Here

Examples of org.geoserver.catalog.CoverageView.InputCoverageBand

     */
    @Test
    public void testBands() throws Exception {

        // Test input bands
        final InputCoverageBand u = new InputCoverageBand("u-component", "0");
        final InputCoverageBand v = new InputCoverageBand("u-component", "0");
        assertEquals(u,v);

        final InputCoverageBand empty = new InputCoverageBand();
        v.setCoverageName("v-component");
        v.setBand("1");
        assertNotEquals(u,v);
        assertNotEquals(u,empty);

View Full Code Here

Examples of org.geoserver.catalog.CoverageView.InputCoverageBand

        addCoverageViewLayer();
    }

    private void addCoverageViewLayer() throws Exception {
        final InputCoverageBand ib0 = new InputCoverageBand("mosaic", "2");
        final CoverageBand b0 = new CoverageBand(Collections.singletonList(ib0), "mosaic@2",
                0, CompositionType.BAND_SELECT);

        final InputCoverageBand ib1 = new InputCoverageBand("mosaic", "1");
        final CoverageBand b1 = new CoverageBand(Collections.singletonList(ib1), "mosaic@1",
                1, CompositionType.BAND_SELECT);

        final InputCoverageBand ib2 = new InputCoverageBand("mosaic", "0");
        final CoverageBand b2 = new CoverageBand(Collections.singletonList(ib2), "mosaic@0",
                2, CompositionType.BAND_SELECT);

        final List<CoverageBand> coverageBands = new ArrayList<CoverageBand>(3);
        coverageBands.add(b0);
View Full Code Here

Examples of org.geoserver.catalog.CoverageView.InputCoverageBand

                    if (bandIndexChar != -1) {
                        coverageName = coverage.substring(0, bandIndexChar);
                        bandIndex = coverage.substring(bandIndexChar + 1, coverage.length());
                    }
                    CoverageBand band = new CoverageBand(
                            Collections.singletonList(new InputCoverageBand(coverageName, bandIndex)),
                            coverageName, i++, compositionType);
                    bandsList.add(band);

                }
                currentOutputBands.addAll(bandsList);
View Full Code Here

Examples of org.geoserver.catalog.CoverageView.InputCoverageBand

        // Use composition rule specific implementation
        CoveragesConsistencyChecker checker = null;
        for (CoverageBand band : bands) {
            // Refactor this once supporting complex compositions
            final InputCoverageBand inputBand = band.getInputCoverageBands().get(0);
            final String coverageName = inputBand.getCoverageName();
            final GridCoverage2DReader reader = wrap(delegate, coverageName, coverageInfo);

            // Remove this when removing constraints
            if (checker == null) {
                checker = new CoveragesConsistencyChecker(reader);
            } else {
                checker.checkConsistency(reader);
            }

            GridCoverage2D coverage = (GridCoverage2D) reader.read(parameters);
            if (coverage != null) {

                // We may consider revisiting this to use integers instead of String
                // For the moment, let's continue using String
                String selectedBand = inputBand.getBand();
                if (BANDSELECT != null) {
                    final ParameterValueGroup param = BANDSELECT.getParameters();
                    param.parameter("Source").setValue(coverage);
                    param.parameter("SampleDimensions").setValue(new int[]{Integer.valueOf(selectedBand)});
                    coverage = (GridCoverage2D) PROCESSOR.doOperation(param, hints);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.