Package javax.media.jai

Examples of javax.media.jai.Interpolation


    public void testCoverageWithBilinearInterp() throws MismatchedDimensionException,
            TransformException {
        // Execution of the RasterAsPointCollectionProcess setting hemisphere, scaleFactor and bilinear interpolation
        boolean hemisphere = true;
        float scaleFactor = 2.0f;
        Interpolation interp = new InterpolationBilinear();
        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


    public void testCoverageWithBicubicInterp() throws MismatchedDimensionException,
            TransformException {
        // Execution of the RasterAsPointCollectionProcess setting hemisphere, scaleFactor and bicubic interpolation
        boolean hemisphere = true;
        float scaleFactor = 2.0f;
        Interpolation interp = new InterpolationBicubic(8);
        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

    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

    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

                  interpolation = Interpolation.getInstance(Interpolation.INTERP_BICUBIC);
              }
          }
      }
    */
      Interpolation interpolation = Interpolation.getInstance(Interpolation.INTERP_BILINEAR);
     
      Map<Object,Object> parameters = new HashMap<Object,Object>();
      // /////////////////////////////////////////////////////////
      //
      // Reading the coverage
View Full Code Here

            }
           
            /**
             * Checking for supported Interpolation Methods
             */
            Interpolation interpolation = Interpolation.getInstance(Interpolation.INTERP_NEAREST);
            if (interpolationType != null) {
                if (interpolationType.equalsIgnoreCase("bilinear")) {
                    interpolation = Interpolation.getInstance(Interpolation.INTERP_BILINEAR);
                } else if (interpolationType.equalsIgnoreCase("bicubic")) {
                    interpolation = Interpolation.getInstance(Interpolation.INTERP_BICUBIC);
View Full Code Here

            }

            /**
             * Checking for supported Interpolation Methods
             */
            Interpolation interpolation = Interpolation.getInstance(Interpolation.INTERP_NEAREST);
            if (interpolationType != null) {
                if (interpolationType.equalsIgnoreCase("linear") || interpolationType.equalsIgnoreCase("bilinear")) {
                    interpolation = Interpolation.getInstance(Interpolation.INTERP_BILINEAR);
                } else if (interpolationType.equalsIgnoreCase("cubic") || interpolationType.equalsIgnoreCase("bicubic")) {
                    interpolation = Interpolation.getInstance(Interpolation.INTERP_BICUBIC);
View Full Code Here

        // Handle interpolation extension
        //
        // notice that for the moment we support only homogeneous interpolation on the 2D axis
        final Map<String, InterpolationPolicy> axesInterpolations = extractInterpolation(reader,
                extensions);
        final Interpolation spatialInterpolation = extractSpatialInterpolation(axesInterpolations,
                reader.getOriginalEnvelope());
        final OverviewPolicy overviewPolicy = extractOverviewPolicy(extensions);
        // TODO time interpolation
        assert spatialInterpolation != null;
View Full Code Here

        // extract interpolation
        //
        // we assume that we are going to support the same interpolation ONLY on the i and j axes
        // therefore we extract the first one of the two we find. We implicitly assume we already
        // checked that we don't have mixed interpolation types for lat,lon
        Interpolation interpolation=InterpolationPolicy.getDefaultPolicy().getInterpolation();
        for(String axisLabel:axesInterpolations.keySet()){
            // check if this is an axis we like
            final int index=envelopeDimensionsMapper.getAxisIndex(envelope, axisLabel);
            if(index==0||index==1){
                // found it!
View Full Code Here

            final double[] preAppliedScale) throws Exception {

        CoverageInfo cinfo = helper.getCoverageInfo();
        WCSEnvelope requestedEnvelope = helper.getRequestedEnvelope();
        // checks
        Interpolation spatialInterpolation = request.getSpatialInterpolation();
        Utilities.ensureNonNull("interpolation", spatialInterpolation);

        //
        // check if we need to reproject the subset envelope back to coverageCRS
        //
View Full Code Here

TOP

Related Classes of javax.media.jai.Interpolation

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.