0

In GeoTools, I need to perform a one-to-one pixel computation between a bunch of GridCoverage2D. In short: some map algebra. As I understood I can do things like summing values of coverages using:

Coverage summCoverage = Operations.DEFAULT.add(coverage1, coverage2);

I would like to create an Operation involving multiple coverages.. ..but I didn't find any hint about how to proceed.

3
  • 1
    please don't edit your question to add new questions - just ask a new question referencing this one
    – Ian Turton
    Feb 13, 2019 at 13:28
  • I have seen @geowolf demo ndvi calculation interactively - see blog.geoserver.org/2018/09/24/geoserver-2-14-0-released for an example
    – Ian Turton
    Feb 13, 2019 at 13:32
  • Nice suggestion indeed: I will study that reference as tha chance of calling Jiffle through an SLD was completely out of my sight!
    – mcfoi
    Feb 13, 2019 at 13:44

1 Answer 1

3

It sounds like you need jiffle which is contained in the gt-process-raster module. Once you have constructed a Process you can pass in a list of source rasters and bands for it to process in the execute method. The actual operation is defined in the jiffle scripting language which is fairly powerful including loops, conditionals and good range of functions. You can also extend it if necessary.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.