1

Here's the situation:

  • Input:
    • A bunch of data (NetCDF) that contains seperate variables/arrays for R/G/B channels.
  • Desired output:
    • Web service (e.g. WMS) that can serve simulated true-color imagery derived from input channels.
  • Limitations:
    • I can't duplicate the data (e.g. pre-process and have a collection of TIFFs to read), it needs to be computed and served on-the-fly as there is a lot of data and any duplication is out of scope.
    • Need to apply some color enhancements so solution needs to support some arbitrary middleware (preferably Python) to adjust the values.

I could do this a number of bespoke ways but an OGC solution such as WMS would be much preferred if possible.

I know GeoServer supports a number of extensions for reading data from various databases, I wonder if there anything that supports executing an arbitrary script to return the data?

1 Answer 1

2

GeoServer provides rendering transformations that can do exactly this. The manual contains an example using Jiffle that calculates NDVI on the fly from multiband Sentinel data.

    <Transformation>
      <ogc:Function name="ras:Jiffle">
        <ogc:Function name="parameter">
          <ogc:Literal>coverage</ogc:Literal>
        </ogc:Function>
        <ogc:Function name="parameter">
          <ogc:Literal>script</ogc:Literal>
          <ogc:Literal>
            nir = src[7];
            vir = src[3];
            dest = (nir - vir) / (nir + vir);
          </ogc:Literal>
        </ogc:Function>
      </ogc:Function>
    </Transformation>

You could ultimately write your own processing plugin functions in Java or (more difficult) in Python to implement custom code.

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.