Tabnine Logo
it.geosolutions.jaiext.jiffle
Code IndexAdd Tabnine to your IDE (free)

How to use it.geosolutions.jaiext.jiffle

Best Java code snippets using it.geosolutions.jaiext.jiffle (Showing top 20 results out of 315)

origin: geotools/geotools

Set<GetSourceValue> positions = Jiffle.getReadPositions(script, Arrays.asList(sourceName));
if (positions.isEmpty()) {
  return null;
  Band band = position.getPos().getBand();
  Expression index = band.getIndex();
  if (index == null) {
    bands.add(0);
  } else if (index instanceof ScalarLiteral) {
    bands.add(Integer.valueOf(((ScalarLiteral) band.getIndex()).getValue()));
  } else {
    if (LOGGER.isLoggable(Level.FINE)) {
origin: it.geosolutions.jaiext.jiffle/jt-jiffle-language

/**
 * Associates a variable name with a source image. The default coordinate
 * system will be used for this image.
 * The image will be stored by the builder as a weak reference.
 *
 * @param varName variable name
 * @param sourceImage the source image
 * @return the instance of this class to allow method chaining
 */
public JiffleBuilder source(String varName, RenderedImage sourceImage) {
  return source(varName, sourceImage, null);
}
origin: it.geosolutions.jaiext.jiffle/jt-jiffle-language

private JiffleBuilder doSetWorld(Rectangle2D worldBounds, double xres, double yres) {
  worldInfo = new WorldInfo();
  worldInfo.bounds = worldBounds;
  worldInfo.xres = xres;
  worldInfo.yres = yres;
  return this;
}
origin: geosolutions-it/jai-ext

private JiffleDirectRuntime getRuntimeWithImagesBlock() throws Exception {
  String script = 
       "images {"
      + "  src1=read; src2=read; src3=read;"
      + "  dest1=write; dest2=write; dest3=write;"
      + "}"
      + "dest1 = src1; dest2 = src2; dest3 = src3;" ;
  Jiffle jiffle = new Jiffle();
  jiffle.setScript(script);
  jiffle.compile();
  return jiffle.getRuntimeInstance();
}

origin: geosolutions-it/jai-ext

  public void runScriptWithBuilder(File scriptFile) throws Exception {
    // docs-begin-builder-example
    JiffleBuilder builder = new JiffleBuilder();
    
    // These chained methods read the script from a file,
    // create a new image for the output, and run the script
    builder.script(scriptFile).dest("destImg", 500, 500).run();
    
    RenderedImage result = builder.getImage("destImg");
    // docs-end-builder-example
  }
}
origin: geosolutions-it/jai-ext

public void getSourceFromJiffleObject(String script) throws JiffleException {
  Jiffle jiffle = new Jiffle();
  jiffle.setScript(script);
  
  // You have to compile the script before getting the runtime
  // source otherwise an Exception will be thrown
  jiffle.compile();
  
  // Get the Java source. The boolean argument specifies that we
  // want the input script copied into the class javadocs
  String runtimeSource = jiffle.getRuntimeSource(true);
}
// docs end getSourceFromJiffleObject
origin: geosolutions-it/jai-ext

private Jiffle getCompiledJiffle(String script) throws JiffleException {
  Jiffle jiffle = new Jiffle();
  jiffle.setScript(script);
  jiffle.compile();
  
  return jiffle;
}

origin: geosolutions-it/jai-ext

public void getSourceFromJiffleBuilder(String script) throws JiffleException {
  JiffleBuilder builder = new JiffleBuilder();
  builder.script(script);
  
  // Set source and destination parameters, then...
  
  String runtimeSource = builder.getRuntimeSource();
}
// docs end getSourceFromJiffleBuilder
origin: geosolutions-it/jai-ext

@Test(expected=JiffleException.class)
public void invalidBaseClass() throws Exception {
  class Foo extends NullRuntime { }
  
  setupSingleDestScript();
   Object runtime = jiffle.getRuntimeInstance(Foo.class);
}
origin: it.geosolutions.jaiext.jiffle/jt-jiffle-language

/**
 * Creates a new instance with the given list of messages.
 * 
 * @param errors list of error messages
 */
public JiffleException(List<String> errors) {
  super(listToString(errors));
}
origin: it.geosolutions.jaiext.jiffle/jt-jiffle-language

/**
 * Reads the script from {@code scriptFile}.
 *
 * @param scriptFile file containing the script
 *
 * @return the instance of this class to allow method chaining
 * @throws JiffleException if there were problems reading the file
 */
public JiffleBuilder script(File scriptFile) throws JiffleException {
  script = readScriptFile(scriptFile);
  return this;
}
origin: it.geosolutions.jaiext.jiffle/jt-jiffle-language

/**
 * Creates a new instance.
 */
public Jiffle() {
  init();
}

origin: it.geosolutions.jaiext.jiffle/jt-jiffle-language

private static void reportMessages(Jiffle.Result result) throws
    it.geosolutions.jaiext.jiffle.JiffleException {
  reportMessages(result.messages);
}
origin: geosolutions-it/jai-ext

  private JiffleDirectRuntime getRuntime(String script) throws Exception {
    Jiffle jiffle = new Jiffle();
    jiffle.setScript(script);
    jiffle.compile();
    return jiffle.getRuntimeInstance();
  }
}
origin: geosolutions-it/jai-ext

  protected void compileScript(String script) throws JiffleException {
    Jiffle jiffle = new Jiffle();
    jiffle.setScript(script);
    jiffle.compile();
  }
}
origin: geosolutions-it/jai-ext

/**
 * Associates a variable name with a source image. The default coordinate
 * system will be used for this image.
 * The image will be stored by the builder as a weak reference.
 *
 * @param varName variable name
 * @param sourceImage the source image
 * @return the instance of this class to allow method chaining
 */
public JiffleBuilder source(String varName, RenderedImage sourceImage) {
  return source(varName, sourceImage, null);
}
origin: geosolutions-it/jai-ext

private JiffleBuilder doSetWorld(Rectangle2D worldBounds, double xres, double yres) {
  worldInfo = new WorldInfo();
  worldInfo.bounds = worldBounds;
  worldInfo.xres = xres;
  worldInfo.yres = yres;
  return this;
}
origin: geosolutions-it/jai-ext

/**
 * Creates a new instance with the given list of messages.
 * 
 * @param errors list of error messages
 */
public JiffleException(List<String> errors) {
  super(listToString(errors));
}
origin: geosolutions-it/jai-ext

/**
 * Reads the script from {@code scriptFile}.
 *
 * @param scriptFile file containing the script
 *
 * @return the instance of this class to allow method chaining
 * @throws JiffleException if there were problems reading the file
 */
public JiffleBuilder script(File scriptFile) throws JiffleException {
  script = readScriptFile(scriptFile);
  return this;
}
origin: geosolutions-it/jai-ext

/**
 * Creates a new instance.
 */
public Jiffle() {
  init();
}

it.geosolutions.jaiext.jiffle

Most used classes

  • Jiffle
    Compiles scripts and generates Java sources and executable bytecode for runtime classes. Example of
  • JiffleBuilder
    A builder class which makes it easier to compile and run basic Jiffle scripts. When working with Ji
  • JiffleDirectRuntime
    Defines methods implemented by runtime classes adopting the direct evaluation model. In this model,
  • Band
  • GetSourceValue
  • CoordinateTransforms,
  • JiffleEvent,
  • JiffleExecutor,
  • JiffleExecutorResult,
  • JiffleDescriptor,
  • JiffleException,
  • CompilerMessage,
  • ConstantLookup,
  • DirectSources,
  • Errors,
  • ExpressionWorker,
  • FunctionInfo,
  • FunctionLookup,
  • ImagesBlockWorker
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now