Package org.geoserver.wps

Examples of org.geoserver.wps.WPSException


            try {
                delegate.encode(xmls);
            } catch (IOException e) {
                throw e;
            } catch (Exception e) {
                throw new WPSException("An error occurred while encoding "
                        + "the results of the process", e);
            }
        } else if(rawResult instanceof CDataEncoderDelegate) {
          try {
                ((CDataEncoderDelegate) rawResult).encode(output);
          } catch(Exception e) {
            throw new WPSException("An error occurred while encoding "
                        + "the results of the process", e);
          }
        } else if(rawResult instanceof BinaryEncoderDelegate) {
          try {
            ((BinaryEncoderDelegate) rawResult).encode(output);
          } catch(Exception e) {
            throw new WPSException("An error occurred while encoding "
                        + "the results of the process", e);
          }
        } else {
            throw new WPSException("Cannot encode an object of class "
                    + rawResult.getClass() + " in raw form");
        }
    }
View Full Code Here


        }

        // and then we try to read it as a geotiff
        AbstractGridFormat format = GridFormatFinder.findFormat(f);
        if (format instanceof UnknownFormat) {
            throw new WPSException(
                    "Could not find the GeoTIFF GT2 format, please check it's in the classpath");
        }
        return format.getReader(f).read(null);
    }
View Full Code Here

        final GeneralParameterValue[] wps = (GeneralParameterValue[]) params.values().toArray(
                new GeneralParameterValue[1]);
        // write out the coverage
        AbstractGridCoverageWriter writer = (AbstractGridCoverageWriter) format.getWriter(os);
        if (writer == null)
            throw new WPSException(
                    "Could not find the GeoTIFF writer, please check it's in the classpath");
        try {
            writer.write(coverage, wps);
        } finally {
            try {
View Full Code Here

TOP

Related Classes of org.geoserver.wps.WPSException

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.