Package org.geotools.coverage.grid

Examples of org.geotools.coverage.grid.GridCoverage2D.view()


        //
        ///////////////////////////////////////////////////////////////////////
        // on this one the subsample average should NOT go back to the
        // geophysiscs view before being applied
        interp = Interpolation.getInstance(Interpolation.INTERP_NEAREST);
        scale(floatCoverage.view(PACKED), interp);

        // Play with a rotated coverage
        scale(rotate(floatCoverage.view(GEOPHYSICS), Math.PI/4), null);
    }
View Full Code Here


        // geophysiscs view before being applied
        interp = Interpolation.getInstance(Interpolation.INTERP_NEAREST);
        scale(floatCoverage.view(PACKED), interp);

        // Play with a rotated coverage
        scale(rotate(floatCoverage.view(GEOPHYSICS), Math.PI/4), null);
    }

    /**
     * Applies a scale on the photographic view of the given coverage.
     *
 
View Full Code Here

        //
        ///////////////////////////////////////////////////////////////////////
        // on this one the subsample average should NOT go back to the
        // geophysiscs view before being applied
        interp = Interpolation.getInstance(Interpolation.INTERP_NEAREST);
        affine(floatCoverage.view(PACKED), interp);

        // Play with a rotated coverage
        affine(rotate(floatCoverage.view(GEOPHYSICS), Math.PI/4), null);
    }
View Full Code Here

        // geophysiscs view before being applied
        interp = Interpolation.getInstance(Interpolation.INTERP_NEAREST);
        affine(floatCoverage.view(PACKED), interp);

        // Play with a rotated coverage
        affine(rotate(floatCoverage.view(GEOPHYSICS), Math.PI/4), null);
    }

    /**
     * Applies an affine operation on the photographic view of the given coverage.
     *
 
View Full Code Here

                        // fallthrough same code than PACKED.
    case PACKED:
      // in this case we work on the non geophysics version because it
      // should be faster than working on the geophysics one. We are going
      // to work on a single band indexed image.
      sourceCoverage = sourceCoverage.view(strategy);
      sourceImage = sourceCoverage.getRenderedImage();
      break;
    }
 
    // /////////////////////////////////////////////////////////////////////
View Full Code Here

                      properties); // Properties
 
   
    // now let's see what we need to do in order to clean things up
    if (strategy == ViewType.GEOPHYSICS)
      return result.view(ViewType.PACKED);
    if (strategy == ViewType.PACKED)
      return result.view(ViewType.GEOPHYSICS);
    return result;   
  }
View Full Code Here

   
    // now let's see what we need to do in order to clean things up
    if (strategy == ViewType.GEOPHYSICS)
      return result.view(ViewType.PACKED);
    if (strategy == ViewType.PACKED)
      return result.view(ViewType.GEOPHYSICS);
    return result;   
  }

}
View Full Code Here

        /*
         * The resampling may have been performed on the geophysics view.
         * Try to restore the original view.
         */
        GridCoverage2D coverage = new Resampler2D(source, image, geometry, sampleDimensions, properties, hints);
        coverage = coverage.view(finalView);
        return coverage;
    }
   
    /**
     * Creates a new coverage with a different coordinate reference reference system. If a
View Full Code Here

        /*
         * Applies the operation. This delegates the work to the chain of 'deriveXXX' methods.
         */
        GridCoverage2D coverage = deriveGridCoverage(sources, params);
        if (primarySourceType != null) {
            coverage = coverage.view(primarySourceType);
        }
        return coverage;
    }

    /**
 
View Full Code Here

        // view before being applied.
        subsampleAverage(originallyIndexedCoverage.view(PACKED), false);

        // On this one the subsample average should NOT go back to the
        // geophysics view before being applied.
        subsampleAverage(floatCoverage.view(PACKED), true);

        // On this one the subsample average should go back to the
        // geophysiscs view before being applied.
        subsampleAverage(floatCoverage.view(PACKED), 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.