public Query invertQuery(Query targetQuery, GridGeometry gridGeometry) { RenderingProcess process = (RenderingProcess) this.process; // evaluate input expressions // at this point do not have an object to evaluate them against Map<String, Object> inputs = evaluateInputs(null); try { return process.invertQuery(inputs, targetQuery, gridGeometry); } catch (ProcessException e) { throw new RuntimeException( "Failed to invert the query, error is: " + e.getMessage(), e); } }
public GridGeometry invertGridGeometry(Query targetQuery, GridGeometry targetGridGeometry) { RenderingProcess process = (RenderingProcess) this.process; // evaluate input expressions // at this point do not have an object to evaluate them against Map<String, Object> inputs = evaluateInputs(null); try { return process.invertGridGeometry(inputs, targetQuery, targetGridGeometry); } catch (ProcessException e) { throw new RuntimeException( "Failed to invert the grid geometry, error is: " + e.getMessage(), e); } }
@Override public GeneralParameterValue[] customizeReadParams( GridCoverageReader reader, GeneralParameterValue[] params) { RenderingProcess process = (RenderingProcess) this.process; // evaluate input expressions // at this point do not have an object to evaluate them against Map<String, Object> inputs = evaluateInputs(null); try { return process.customizeReadParams(inputs, reader, params); } catch (ProcessException e) { throw new RuntimeException( "Failed to customize the reader parameters, error is: " + e.getMessage(), e); } } }
public Object evaluate(Object object) { Map<String, Object> processInputs = evaluateInputs(object); // execute the process try { ExceptionProgressListener listener = new ExceptionProgressListener(); Map<String, Object> results = process.execute(processInputs, listener); // some processes have the bad habit of not throwing exceptions, but to // report them to the listener if (listener.getExceptions().size() > 0) { // uh oh, an exception occurred during processing Throwable t = listener.getExceptions().get(0); throw new RuntimeException( "Failed to evaluate process function, error is: " + t.getMessage(), t); } return getResult(results, processInputs); } catch (ProcessException e) { throw new RuntimeException( "Failed to evaluate the process function, error is: " + e.getMessage(), e); } }
public static GridCoverage2D process(GridCoverage2D inputCoverage, ProgressListener monitor) { Map<String, Object> map = new HashMap<String, Object>(); map.put(RasterAspectProcessFactory.inputCoverage.key, inputCoverage); Process process = new RasterAspectProcess(null); Map<String, Object> resultMap; try { resultMap = process.execute(map, monitor); return (GridCoverage2D) resultMap.get(RasterAspectProcessFactory.RESULT.key); } catch (ProcessException e) { LOGGER.log(Level.FINER, e.getMessage(), e); } return null; }
public static GridCoverage2D process(GridCoverage2D inputCoverage, ProgressListener monitor) { Map<String, Object> map = new HashMap<String, Object>(); map.put(RasterFlipProcessFactory.inputCoverage.key, inputCoverage); Process process = new RasterFlipProcess(null); Map<String, Object> resultMap; try { resultMap = process.execute(map, monitor); return (GridCoverage2D) resultMap.get(RasterFlipProcessFactory.RESULT.key); } catch (ProcessException e) { LOGGER.log(Level.FINER, e.getMessage(), e); } return null; }
public static GridCoverage2D process(GridCoverage2D inputCoverage, ProgressListener monitor) { Map<String, Object> map = new HashMap<String, Object>(); map.put(RasterTRIProcessFactory.inputCoverage.key, inputCoverage); Process process = new RasterTRIProcess(null); Map<String, Object> resultMap; try { resultMap = process.execute(map, monitor); return (GridCoverage2D) resultMap.get(RasterTRIProcessFactory.RESULT.key); } catch (ProcessException e) { LOGGER.log(Level.FINER, e.getMessage(), e); } return null; }
public static GridCoverage2D process(GridCoverage2D inputCoverage, ProgressListener monitor) { Map<String, Object> map = new HashMap<String, Object>(); map.put(RasterRoughnessProcessFactory.inputCoverage.key, inputCoverage); Process process = new RasterRoughnessProcess(null); Map<String, Object> resultMap; try { resultMap = process.execute(map, monitor); return (GridCoverage2D) resultMap.get(RasterRoughnessProcessFactory.RESULT.key); } catch (ProcessException e) { LOGGER.log(Level.FINER, e.getMessage(), e); } return null; }
public static GridCoverage2D process(GridCoverage2D inputCoverage, ProgressListener monitor) { Map<String, Object> map = new HashMap<String, Object>(); map.put(RasterTPIProcessFactory.inputCoverage.key, inputCoverage); Process process = new RasterTPIProcess(null); Map<String, Object> resultMap; try { resultMap = process.execute(map, monitor); return (GridCoverage2D) resultMap.get(RasterTPIProcessFactory.RESULT.key); } catch (ProcessException e) { LOGGER.log(Level.FINER, e.getMessage(), e); } return null; }
public static SimpleFeatureCollection process(SimpleFeatureCollection polygonFeatures, ProgressListener monitor) { Map<String, Object> map = new HashMap<String, Object>(); map.put(UnionPolygonProcessFactory.polygonFeatures.key, polygonFeatures); Process process = new UnionPolygonProcess(null); Map<String, Object> resultMap; try { resultMap = process.execute(map, monitor); return (SimpleFeatureCollection) resultMap.get(UnionPolygonProcessFactory.RESULT.key); } catch (ProcessException e) { LOGGER.log(Level.FINER, e.getMessage(), e); } return null; }
public static GridCoverage2D process(GridCoverage2D inputCoverage, ProgressListener monitor) { Map<String, Object> map = new HashMap<String, Object>(); map.put(RasterMirrorProcessFactory.inputCoverage.key, inputCoverage); Process process = new RasterMirrorProcess(null); Map<String, Object> resultMap; try { resultMap = process.execute(map, monitor); return (GridCoverage2D) resultMap.get(RasterMirrorProcessFactory.RESULT.key); } catch (ProcessException e) { LOGGER.log(Level.FINER, e.getMessage(), e); } return null; }
public static PearsonResult process(SimpleFeatureCollection inputFeatures, String inputFields, ProgressListener monitor) { Map<String, Object> map = new HashMap<String, Object>(); map.put(PearsonCorrelationProcessFactory.inputFeatures.key, inputFeatures); map.put(PearsonCorrelationProcessFactory.inputFields.key, inputFields); Process process = new PearsonCorrelationProcess(null); Map<String, Object> resultMap; try { resultMap = process.execute(map, monitor); return (PearsonResult) resultMap.get(PearsonCorrelationProcessFactory.RESULT.key); } catch (ProcessException e) { LOGGER.log(Level.FINER, e.getMessage(), e); } return null; }
public static SimpleFeatureCollection process(SimpleFeatureCollection inputFeatures, SimpleFeatureCollection differenceFeatures, ProgressListener monitor) { Map<String, Object> map = new HashMap<String, Object>(); map.put(SymDifferenceProcessFactory.inputFeatures.key, inputFeatures); map.put(SymDifferenceProcessFactory.differenceFeatures.key, differenceFeatures); Process process = new SymDifferenceProcess(null); Map<String, Object> resultMap; try { resultMap = process.execute(map, monitor); return (SimpleFeatureCollection) resultMap.get(SymDifferenceProcessFactory.RESULT.key); } catch (ProcessException e) { LOGGER.log(Level.FINER, e.getMessage(), e); } return null; }
public static GridCoverage2D process(GridCoverage2D inputCoverage, double zFactor, ProgressListener monitor) { Map<String, Object> map = new HashMap<String, Object>(); map.put(RasterCurvatureProcessFactory.inputCoverage.key, inputCoverage); map.put(RasterCurvatureProcessFactory.zFactor.key, zFactor); Process process = new RasterCurvatureProcess(null); Map<String, Object> resultMap; try { resultMap = process.execute(map, monitor); return (GridCoverage2D) resultMap.get(RasterCurvatureProcessFactory.RESULT.key); } catch (ProcessException e) { LOGGER.log(Level.FINER, e.getMessage(), e); } return null; }
public static SimpleFeatureCollection process(SimpleFeatureCollection inputFeatures, Expression tolerance, ProgressListener monitor) { Map<String, Object> map = new HashMap<String, Object>(); map.put(DensifyProcessFactory.inputFeatures.key, inputFeatures); map.put(DensifyProcessFactory.tolerance.key, tolerance); Process process = new DensifyProcess(null); Map<String, Object> resultMap; try { resultMap = process.execute(map, monitor); return (SimpleFeatureCollection) resultMap.get(DensifyProcessFactory.RESULT.key); } catch (ProcessException e) { LOGGER.log(Level.FINER, e.getMessage(), e); } return null; }
public static SimpleFeatureCollection process(SimpleFeatureCollection inputFeatures, ProgressListener monitor) { Map<String, Object> map = new HashMap<String, Object>(); map.put(RepairGeometryProcessFactory.inputFeatures.key, inputFeatures); Process process = new RepairGeometryProcess(null); Map<String, Object> resultMap; try { resultMap = process.execute(map, monitor); return (SimpleFeatureCollection) resultMap.get(RepairGeometryProcessFactory.RESULT.key); } catch (ProcessException e) { LOGGER.log(Level.FINER, e.getMessage(), e); } return null; }
public static SimpleFeatureCollection process(Collection<SimpleFeatureCollection> features, Filter filter, ProgressListener monitor) { Map<String, Object> map = new HashMap<String, Object>(); map.put(MergeFeaturesProcessFactory.features.key, features); Process process = new MergeFeaturesProcess(null); Map<String, Object> resultMap; try { resultMap = process.execute(map, monitor); return (SimpleFeatureCollection) resultMap.get(MergeFeaturesProcessFactory.RESULT.key); } catch (ProcessException e) { LOGGER.log(Level.FINER, e.getMessage(), e); } return null; }
public static SimpleFeatureCollection process(SimpleFeatureCollection lineFeatures, ProgressListener monitor) { Map<String, Object> map = new HashMap<String, Object>(); map.put(FlipLineProcessFactory.lineFeatures.key, lineFeatures); Process process = new FlipLineProcess(null); Map<String, Object> resultMap; try { resultMap = process.execute(map, monitor); return (SimpleFeatureCollection) resultMap.get(FlipLineProcessFactory.RESULT.key); } catch (ProcessException e) { LOGGER.log(Level.FINER, e.getMessage(), e); } return null; }
public Query invertQuery(Query targetQuery, GridGeometry gridGeometry) { RenderingProcess process = (RenderingProcess) this.process; // evaluate input expressions // at this point do not have an object to evaluate them against Map<String, Object> inputs = evaluateInputs(null); try { return process.invertQuery(inputs, targetQuery, gridGeometry); } catch (ProcessException e) { throw new RuntimeException("Failed to invert the query, error is: " + e.getMessage(), e); } }
public GridGeometry invertGridGeometry(Query targetQuery, GridGeometry targetGridGeometry) { RenderingProcess process = (RenderingProcess) this.process; // evaluate input expressions // at this point do not have an object to evaluate them against Map<String, Object> inputs = evaluateInputs(null); try { return process.invertGridGeometry(inputs, targetQuery, targetGridGeometry); } catch (ProcessException e) { throw new RuntimeException("Failed to invert the grid geometry, error is: " + e.getMessage(), e); } }