Package org.geotools.coverage.processing

Examples of org.geotools.coverage.processing.CoverageProcessingException


    //
    // Is this node disposed? If so throw an exception
    //
    // /////////////////////////////////////////////////////////////////////
    if (disposed) {
      error = new CoverageProcessingException(
          "Trying to process a disposed CoverageProcessingNode.");
      return;
    }

    // /////////////////////////////////////////////////////////////////////
    //
    // We cannot execute the same node twice in this simpe design
    //
    // /////////////////////////////////////////////////////////////////////
    if (!executed) {
      try {
              output=null;
        // executes this node
              final GridCoverage result = execute();
        if (result == null)
          error = new CoverageProcessingException("Something bad occurred while trying to execute this node.");
        if (!(result instanceof GridCoverage2D))
            error = new CoverageProcessingException("Something bad occurred while trying to execute this node.");
        if(error==null)
            output=(GridCoverage2D) result;
      } catch (Throwable t) {
        // something bad happened
        output = null;
View Full Code Here


     */
  public GridCoverage2D getOutput()
      throws CoverageProcessingException {
    checkExecuted();
    if (error != null)
      throw new CoverageProcessingException(error);
    return output;

  }
View Full Code Here

        // Creation of the ParameterBlockJAI object to pass to JAI.
        ParameterBlockJAI block;
        try {
            block = prepareParameters(parameters, sources, tr, crsToGrid);
        } catch (MismatchedDimensionException e) {
            throw new CoverageProcessingException(e);
        } catch (ParameterNotFoundException e) {
            throw new CoverageProcessingException(e);
        } catch (TransformException e) {
            throw new CoverageProcessingException(e);
        }
        /*
         * Applies the operation.
         */
        coverage = deriveGridCoverage(sources, new BandMergeParams(crs, gridToCRS, globalBbox,
View Full Code Here

        for (int i = 0; i < sources.length; i++) {
            final GridCoverage2D source = sources[i];
            CoordinateReferenceSystem crsSource = source.getCoordinateReferenceSystem();
            if (!CRS.equalsIgnoreMetadata(crs, crsSource)) {
                throw new CoverageProcessingException("Input Coverages have different CRS");
            }
        }
        // Preparation of the input parameters and resampling of the source images
        final Params params = prepareParameters(parameters, sources, hints);
View Full Code Here

        RenderedImage[] rasters = rr.getRasters();

        // Setting of the final GridGeometry
        GridGeometry2D finalGeometry = rr.getFinalGeometry();
        if (finalGeometry == null) {
            throw new CoverageProcessingException("No final GridGeometry found");
        }

        // Setting the source rasters for the mosaic
        int numSources = rasters.length;
        for (int i = 0; i < numSources; i++) {
View Full Code Here

TOP

Related Classes of org.geotools.coverage.processing.CoverageProcessingException

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.