Examples of InterpolationNearest


Examples of javax.media.jai.InterpolationNearest

    public void testCoverageWithNearestInterp() throws MismatchedDimensionException,
            TransformException {
        // Execution of the RasterAsPointCollectionProcess setting hemisphere, scaleFactor and nearest interpolation
        boolean hemisphere = true;
        float scaleFactor = 2.0f;
        Interpolation interp = new InterpolationNearest();
        SimpleFeatureCollection collection = process.execute(coverage, null, scaleFactor, interp,
                hemisphere);
        // Check if the points are exactly as the number of pixel number
        Assert.assertEquals((int) (pixelNumber * scaleFactor * scaleFactor), collection.size());
        // Check if each Point Attribute contains the same values of the Input coverage
View Full Code Here

Examples of javax.media.jai.InterpolationNearest

    public void testCoverageWithTargetCRS() throws MismatchedDimensionException,
            TransformException, FactoryException {
        // Execution of the RasterAsPointCollectionProcess setting hemisphere, scaleFactor, nearest interpolation and targetCRS
        boolean hemisphere = true;
        float scaleFactor = 2.0f;
        Interpolation interp = new InterpolationNearest();
        // Selection of the Lambert Conformal Conic CRS
        String wkt = "PROJCS[\"Lambert_Conformal_Conic\","
                + "GEOGCS[\"GCS_unknown\",DATUM[\"D_unknown\","
                + "SPHEROID[\"Sphere\",6367470,0]],PRIMEM[\"Greenwich\",0],"
                + "UNIT[\"Degree\",0.017453292519943295]],"
View Full Code Here

Examples of javax.media.jai.InterpolationNearest

    public void testCoverageDifferentCRS() throws MismatchedDimensionException, TransformException,
            FactoryException {
        // Execution of the RasterAsPointCollectionProcess setting hemisphere, scaleFactor, nearest interpolation and targetCRS
        boolean hemisphere = true;
        float scaleFactor = 2.0f;
        Interpolation interp = new InterpolationNearest();
        // Selection of the Lambert Conformal Conic CRS
        String wkt = "PROJCS[\"Lambert_Conformal_Conic\","
                + "GEOGCS[\"GCS_unknown\",DATUM[\"D_unknown\","
                + "SPHEROID[\"Sphere\",6367470,0]],PRIMEM[\"Greenwich\",0],"
                + "UNIT[\"Degree\",0.017453292519943295]],"
View Full Code Here

Examples of javax.media.jai.InterpolationNearest

            // keep into account translation factors to place this tile
            final AffineTransform translationTransform = tempRaster2Model;
            translationTransform.preConcatenate((AffineTransform) worldToGrid);

            final InterpolationNearest nearest = new InterpolationNearest();
            // paranoiac check to avoid that JAI freaks out when computing its
            // internal layouT on images that are too small
            Rectangle2D finalLayout = ImageUtilities.layoutHelper(raster,
                    (float) translationTransform.getScaleX(),
                    (float) translationTransform.getScaleY(),
View Full Code Here

Examples of javax.media.jai.InterpolationNearest

          param =  CoverageToolsConstants.FILTERED_SUBSAMPLE_FACTORY.getParameters();
          param.parameter("source").setValue(gc);
          param.parameter("scaleX").setValue(new Integer((int) scaleFactor));
          param.parameter("scaleY").setValue(new Integer((int) scaleFactor));
          param.parameter("qsFilterArray").setValue(new float[] { 0.5F, 1.0F / 3.0F, 0.0F,-1.0F / 12.0F });
          param.parameter("Interpolation").setValue(new InterpolationNearest());
          gc = (GridCoverage2D) CoverageToolsConstants.FILTERED_SUBSAMPLE_FACTORY.doOperation(param, new Hints());
        } else if (scaleAlgorithm.equalsIgnoreCase("bil")) {
          param = processor.getOperation("Scale").getParameters();
          param.parameter("Source").setValue(gc);
          param.parameter("xScale").setValue(
View Full Code Here

Examples of javax.media.jai.InterpolationNearest

        ParameterBlock pb = new ParameterBlock();
        pb.addSource(image);
        pb.add(0.0F);
        pb.add(0.0F);
        pb.add(t_angle);
        pb.add(new InterpolationNearest());
        return JAI.create("Rotate", pb, null);
    }
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.