Package es.unex.sextante.exceptions

Examples of es.unex.sextante.exceptions.GeoAlgorithmExecutionException


                    return;
                }
            }
        }
        if(Double.isNaN(cellSize)) {
            throw new GeoAlgorithmExecutionException(SEXTANTE_GRID_CELL_SIZE
                    + " parameter could not be derived from inputs, and is not available among ");
        }
       
        // get the extents
        Envelope envelope = null;
        if(input.get(SEXTANTE_GRID_ENVELOPE) != null) {
            envelope = (Envelope) input.get(SEXTANTE_GRID_ENVELOPE);
        } else {
            for(String sKey : input.keySet()) {
                    Object value = paramSet.getParameter(sKey).getParameterValueAsObject();
                    if(value instanceof GTRasterLayer) {
                        GridExtent ge = ((GTRasterLayer) value).getLayerGridExtent();
                        Envelope genv = new Envelope(ge.getXMin(), ge.getXMax(), ge.getYMin(), ge.getYMax());
                        if(envelope == null) {
                            envelope = genv;
                        } else {
                            envelope.expandToInclude(genv);
                        }
                        return;
                    }
                }
        }
        if(envelope == null) {
            if(Double.isNaN(cellSize)) {
                    throw new GeoAlgorithmExecutionException(SEXTANTE_GRID_ENVELOPE
                            + " parameter could not be derived from inputs, and is not available among ");
                }
        }
       
        // build and set the grid extends
View Full Code Here


                    return;
                }
            }
        }
        if(Double.isNaN(cellSize)) {
            throw new GeoAlgorithmExecutionException(SEXTANTE_GRID_CELL_SIZE
                    + " parameter could not be derived from inputs, and is not available among ");
        }
       
        // get the extents
        Envelope envelope = null;
        if(input.get(SEXTANTE_GRID_ENVELOPE) != null) {
            envelope = (Envelope) input.get(SEXTANTE_GRID_ENVELOPE);
        } else {
            for(String sKey : input.keySet()) {
                    Object value = paramSet.getParameter(sKey).getParameterValueAsObject();
                    if(value instanceof GTRasterLayer) {
                        GridExtent ge = ((GTRasterLayer) value).getLayerGridExtent();
                        Envelope genv = new Envelope(ge.getXMin(), ge.getXMax(), ge.getYMin(), ge.getYMax());
                        if(envelope == null) {
                            envelope = genv;
                        } else {
                            envelope.expandToInclude(genv);
                        }
                        return;
                    }
                }
        }
        if(envelope == null) {
            if(Double.isNaN(cellSize)) {
                    throw new GeoAlgorithmExecutionException(SEXTANTE_GRID_ENVELOPE
                            + " parameter could not be derived from inputs, and is not available among ");
                }
        }
       
        // build and set the grid extends
View Full Code Here

TOP

Related Classes of es.unex.sextante.exceptions.GeoAlgorithmExecutionException

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.