Examples of geophysics()


Examples of org.geotools.coverage.Category.geophysics()

        }
        final NumberRange range = deriveRange(ranges, parameters);
        if (range != null) {
            final Category category = categories[PRIMARY_SOURCE_INDEX];
            return new Category(category.getName(), category.getColors(),
                                category.geophysics(false).getRange(), range).geophysics(true);
        }
        return null;
    }

    /**
 
View Full Code Here

Examples of org.geotools.coverage.Category.geophysics()

     * masks and the value range in the source grid coverage.
     */
    protected Category deriveCategory(final Category[] categories, final Parameters parameters) {
        NumberRange          range = null;
        Category          category = categories[0];
        final NumberRange  samples = category.geophysics(false).getRange();
        final boolean isGeophysics = (category == category.geophysics(true));
        /*
         * Computes a default range of output values one from the normalized kernels.
         * The normalization has been done by 'deriveGridCoverage' before this method
         * is invoked. The algorithm is as below:
View Full Code Here

Examples of org.geotools.coverage.Category.geophysics()

     */
    protected Category deriveCategory(final Category[] categories, final Parameters parameters) {
        NumberRange          range = null;
        Category          category = categories[0];
        final NumberRange  samples = category.geophysics(false).getRange();
        final boolean isGeophysics = (category == category.geophysics(true));
        /*
         * Computes a default range of output values one from the normalized kernels.
         * The normalization has been done by 'deriveGridCoverage' before this method
         * is invoked. The algorithm is as below:
         *
 
View Full Code Here

Examples of org.geotools.coverage.Category.geophysics()

        final KernelJAI mask2 = (KernelJAI) block.getObjectParameter("Mask2");
        final double size = (mask1.getWidth() + mask1.getHeight() +
                             mask2.getWidth() + mask2.getHeight()) / 4.0;
        double factor = getNormalizationFactor(mask1, mask2) / (size-1);
        if (factor>0 && !Double.isInfinite(factor)) {
            range = category.geophysics(true).getRange();
            final double minimum = range.getMinimum();
            final double maximum = range.getMaximum();
            factor *= (maximum - minimum) * DEFAULT_RANGE_SCALE;
            range = NumberRange.create(0, factor);
        }
View Full Code Here

Examples of org.geotools.coverage.Category.geophysics()

            factor *= (maximum - minimum) * DEFAULT_RANGE_SCALE;
            range = NumberRange.create(0, factor);
        }
        if (range != null) {
            category = new Category(category.getName(), DEFAULT_COLOR_PALETTE, samples, range);
            return category.geophysics(isGeophysics);
        }
        return super.deriveCategory(categories, parameters);
    }

    /**
 
View Full Code Here

Examples of org.geotools.coverage.Category.geophysics()

        Category category = categories.get(0);
        assertTrue(category.getName().equals(Category.NODATA.getName()));

        // Check that it does not contain sampleToGeophisics and that the Range contains only NaN
        assertNull(category.getSampleToGeophysics());
        assertEquals(category.geophysics(true).getRange().getMinimum(), Double.NaN, DELTA);
        assertEquals(category.geophysics(true).getRange().getMaximum(), Double.NaN, DELTA);

        // Quantitative nodata category
        sampleDim = new GridSampleDimension("original", new Category[] { new Category(
                Vocabulary.formatInternational(VocabularyKeys.NODATA), new Color[] { new Color(0,
View Full Code Here

Examples of org.geotools.coverage.Category.geophysics()

        assertTrue(category.getName().equals(Category.NODATA.getName()));

        // Check that it does not contain sampleToGeophisics and that the Range contains only NaN
        assertNull(category.getSampleToGeophysics());
        assertEquals(category.geophysics(true).getRange().getMinimum(), Double.NaN, DELTA);
        assertEquals(category.geophysics(true).getRange().getMaximum(), Double.NaN, DELTA);

        // Quantitative nodata category
        sampleDim = new GridSampleDimension("original", new Category[] { new Category(
                Vocabulary.formatInternational(VocabularyKeys.NODATA), new Color[] { new Color(0,
                        0, 0, 0) }, NumberRange.create(-9999, -9999), NumberRange.create(-9999,
View Full Code Here

Examples of org.geotools.coverage.Category.geophysics()

        category = categories.get(0);
        assertTrue(category.getName().equals(Category.NODATA.getName()));

        // Check if it contains sampleToGeophisics and the Range contains the first nodata defined
        assertNotNull(category.getSampleToGeophysics());
        assertEquals(category.geophysics(true).getRange().getMinimum(), noData1, DELTA);
        assertEquals(category.geophysics(true).getRange().getMaximum(), noData1, DELTA);
    }

    /**
     * Test that if no range is defined, Category values or Default values are used
View Full Code Here

Examples of org.geotools.coverage.Category.geophysics()

        assertTrue(category.getName().equals(Category.NODATA.getName()));

        // Check if it contains sampleToGeophisics and the Range contains the first nodata defined
        assertNotNull(category.getSampleToGeophysics());
        assertEquals(category.geophysics(true).getRange().getMinimum(), noData1, DELTA);
        assertEquals(category.geophysics(true).getRange().getMaximum(), noData1, DELTA);
    }

    /**
     * Test that if no range is defined, Category values or Default values are used
     *
 
View Full Code Here

Examples of org.geotools.coverage.GridSampleDimension.geophysics()

                }
                sd = defaultSD[i];
            }
            sd = new RenderedSampleDimension(sd, image, i);
            dst[i] = sd;
            if (sd.geophysics(true ) == sd) countGeophysics++;
            if (sd.geophysics(false) == sd) countIndexed++;
        }
        if (countGeophysics == numBands) {
            return true;
        }
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.