Codota Logo
Process.execute
Code IndexAdd Codota to your IDE (free)

How to use
execute
method
in
org.geotools.process.Process

Best Java code snippets using org.geotools.process.Process.execute (Showing top 20 results out of 315)

  • Common ways to obtain Process
private void myMethod () {
Process p =
  • Codota IconName name;Processors.createProcess(name)
  • Codota IconProcessFactory processFactory;Name name;processFactory.create(name)
  • Smart code suggestions by Codota
}
origin: geotools/geotools

  @Override
  public Map<String, Object> call() throws Exception {
    return process.execute(input, new CallableProgressListener());
  }
};
origin: geotools/geotools

void innerRun() {
  if (!compareAndSetState(0, RUNNING)) {
    return;
  }
  try {
    runningThread = Thread.currentThread();
    innerSet(process.execute(input, this));
  } catch (Throwable ex) {
    innerSetException(ex);
  }
}
origin: geotools/geotools

boolean innerRunAndReset() {
  if (!compareAndSetState(0, RUNNING)) {
    return false;
  }
  try {
    runningThread = Thread.currentThread();
    process.execute(input, this); // don't set the result
    runningThread = null;
    return compareAndSetState(RUNNING, 0);
  } catch (Throwable ex) {
    innerSetException(ex);
    return false;
  }
}
origin: geotools/geotools

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);
  }
}
origin: geotools/geotools

Map<String, Object> resultMap = process.execute(paramMap, progress);
origin: org.geotools/gt-process

  @Override
  public Map<String, Object> call() throws Exception {                
    return process.execute( input, new CallableProgressListener() );
  }            
};
origin: mapplus/spatial_statistics_for_geotools_udig

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;
}
origin: mapplus/spatial_statistics_for_geotools_udig

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;
}
origin: mapplus/spatial_statistics_for_geotools_udig

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;
}
origin: mapplus/spatial_statistics_for_geotools_udig

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;
}
origin: mapplus/spatial_statistics_for_geotools_udig

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;
}
origin: mapplus/spatial_statistics_for_geotools_udig

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;
}
origin: mapplus/spatial_statistics_for_geotools_udig

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;
}
origin: mapplus/spatial_statistics_for_geotools_udig

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;
}
origin: mapplus/spatial_statistics_for_geotools_udig

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;
}
origin: mapplus/spatial_statistics_for_geotools_udig

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;
}
origin: mapplus/spatial_statistics_for_geotools_udig

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;
}
origin: org.geotools/gt-process

void innerRun() {
  if (!compareAndSetState(0, RUNNING)) {
    return;
  }
  
  try {
    runningThread = Thread.currentThread();
    innerSet(process.execute( input, this ));
  } catch(Throwable ex) {
    innerSetException(ex);
  } 
}
origin: org.geotools/gt-process

boolean innerRunAndReset() {
  if (!compareAndSetState(0, RUNNING)) {
    return false;
  }
  
  try {
    runningThread = Thread.currentThread();
    process.execute( input, this ); // don't set the result
    runningThread = null;
    return compareAndSetState(RUNNING, 0);
  } catch(Throwable ex) {
    innerSetException(ex);
    return false;
  } 
}
origin: org.geoserver.script/gs-script-core

public void testRun() throws Exception {
  ScriptProcessFactory pf = new ScriptProcessFactory(scriptMgr);
  Name buffer = pf.getNames().iterator().next();
  assertEquals(getNamespace(), buffer.getNamespaceURI());
  assertEquals(getProcessName(), buffer.getLocalPart());
  org.geotools.process.Process p = pf.create(buffer);
  Geometry g = new WKTReader().read("POINT(0 0)");
  Map inputs = new HashMap();
  inputs.put("geom", g);
  inputs.put("distance", 1);
  Map outputs = p.execute(inputs, null);
  Geometry h = (Geometry) outputs.get("result");
  assertTrue(h.equals(g.buffer(1)));
}
org.geotools.processProcessexecute

Javadoc

Execute this process with the provided inputs.

Popular methods of Process

    Popular in Java

    • Updating database using SQL prepared statement
    • setRequestProperty (URLConnection)
    • getSupportFragmentManager (FragmentActivity)
      Return the FragmentManager for interacting with fragments associated with this activity.
    • getApplicationContext (Context)
    • EOFException (java.io)
      Thrown when a program encounters the end of a file or stream during an input operation.
    • SocketException (java.net)
      This SocketException may be thrown during socket creation or setting options, and is the superclass
    • ArrayList (java.util)
      Resizable-array implementation of the List interface. Implements all optional list operations, and p
    • Collection (java.util)
      Collection is the root of the collection hierarchy. It defines operations on data collections and t
    • PriorityQueue (java.util)
      An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
    • DateTimeFormat (org.joda.time.format)
      Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now