[Geoserver-devel] [JIRA] (GEOS-9048) NPE if a Jiffle Rendering Transformation is used with Channel Selection

Gnafu created an issue

GeoServer / BugGEOS-9048

NPE if a Jiffle Rendering Transformation is used with Channel Selection

Issue Type:

BugBug

Affects Versions:

2.14.1

Assignee:

Unassigned

Components:

WMS

Created:

06/Dec/18 11:09 AM

Priority:

MediumMedium

Reporter:

Gnafu

Trying to use a Jiffle transformation in a style along with a Channel Selection rule will end up with the following error message:

Error rendering coverage on the fast path java.lang.RuntimeException: Failed to evaluate the process function, error is: java.lang.NullPointerException Failed to evaluate the process function, error is: java.lang.NullPointerException java.lang.NullPointerException

Removing the Channel Selection from the rule will render correctly.

Example SLD :

<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd">
  <NamedLayer>
    <Name>Redacted name</Name>
    <UserStyle>
      <Title>Redacted title</Title>
      <FeatureTypeStyle>
        <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>
                if( src[6] > 2 ) dest = src[0];
              </ogc:Literal>
            </ogc:Function>
          </ogc:Function>
        </Transformation>
        <Rule>
          <Name>color scale</Name> 
          <RasterSymbolizer>
            <ChannelSelection>
              <GrayChannel>
                <SourceChannelName>1</SourceChannelName> 
              </GrayChannel>
            </ChannelSelection>
            <Opacity>1.0</Opacity>
            <ColorMap type="ramp">
              <ColorMapEntry color="#ffffff" quantity="270.14" opacity="0"/>
              <ColorMapEntry color="#ffd4ff" quantity="273.2884" />
              <ColorMapEntry color="#3e0000" quantity="308.0096" />
              <ColorMapEntry color="#000000" quantity="308.15" />
            </ColorMap>
          </RasterSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100095-sha1:99ae778)

Atlassian logo