0

I have been supplied an SLD file and a raster dataset. The raster data is a processed sentinel-1 scene.

Here is the SLD:

<?xml version="1.0" encoding="UTF-8"?>
<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" xsi:schemaLocation="http://www.opengis.net/sldhttp://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd" version="1.0.0">
  <NamedLayer>
      <name>S1_Polarisation_V1</name>
      <UserStyle>
        <Title>S1_Polarisation_V1</Title>
        <FeatureTypeStyle>
          <Rule>
            <RasterSymbolizer>
              <Opacity>1.0</Opacity>
              <ChannelSelection>
                <RedChannel>
                  <SourceChannelName>2</SourceChannelName>
                  <ContrastEnhancement>
                    <Normalize>
                      <VendorOption name="algorithm">StretchToMinimumMaximum</VendorOption>
                      <VendorOption name="minValue">-21</VendorOption>
                      <VendorOption name="maxValue">-4</VendorOption>
                    </Normalize>
                  </ContrastEnhancement>
                </RedChannel>
                <GreenChannel>
                  <SourceChannelName>1</SourceChannelName>
                  <ContrastEnhancement>
                    <Normalize>
                      <VendorOption name="algorithm">StretchToMinimumMaximum</VendorOption>
                      <VendorOption name="minValue">-31</VendorOption>
                      <VendorOption name="maxValue">-9</VendorOption>
                    </Normalize>
                  </ContrastEnhancement>
                </GreenChannel>
                <BlueChannel>
                  <SourceChannelName>2</SourceChannelName>
                  <ContrastEnhancement>
                    <Normalize>
                      <VendorOption name="algorithm">StretchToMinimumMaximum</VendorOption>
                      <VendorOption name="minValue">-21</VendorOption>
                      <VendorOption name="maxValue">-4</VendorOption>
                    </Normalize>
                  </ContrastEnhancement>
                </BlueChannel>
              </ChannelSelection>
            </RasterSymbolizer>
          </Rule>
        </FeatureTypeStyle>
      </UserStyle>
    </NamedLayer>
  </StyledLayerDescriptor>

Here is a print of gdalinfo of the raster dataset:

$ gdalinfo -stats S1A_20170706_132_asc_174926_174951_DV_Gamma-0_GB_OSGB_RCTK_SpkRL.tif
Driver: GTiff/GeoTIFF
Files: S1A_20170706_132_asc_174926_174951_DV_Gamma-0_GB_OSGB_RCTK_SpkRL.tif
       S1A_20170706_132_asc_174926_174951_DV_Gamma-0_GB_OSGB_RCTK_SpkRL.tif.aux.xml
Size is 29838, 22566
Coordinate System is:
PROJCS["OSGB 1936 / British National Grid",
    GEOGCS["OSGB 1936",
        DATUM["OSGB_1936",
            SPHEROID["Airy 1830",6377563.396,299.3249646,
                AUTHORITY["EPSG","7001"]],
            TOWGS84[446.448,-125.157,542.06,0.15,0.247,0.842,-20.489],
            AUTHORITY["EPSG","6277"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4277"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",49],
    PARAMETER["central_meridian",-2],
    PARAMETER["scale_factor",0.9996012717],
    PARAMETER["false_easting",400000],
    PARAMETER["false_northing",-100000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH],
    AUTHORITY["EPSG","27700"]]
Origin = (361198.731133800232783,334600.354760660964530)
Pixel Size = (10.000000000000000,-10.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  361198.731,  334600.355) (  2d34'37.17"W, 52d54'25.61"N)
Lower Left  (  361198.731,  108940.355) (  2d33' 5.67"W, 50d52'41.15"N)
Upper Right (  659578.731,  334600.355) (  1d51'19.39"E, 52d50'45.22"N)
Lower Right (  659578.731,  108940.355) (  1d41' 9.68"E, 50d49'16.16"N)
Center      (  510388.731,  221770.355) (  0d23'45.56"W, 51d52'59.21"N)
Band 1 Block=256x256 Type=Float32, ColorInterp=Gray
  Min=-86.068 Max=36.300
  Minimum=-86.068, Maximum=36.300, Mean=-10.272, StdDev=4.062
  NoData Value=nan
  Overviews: 14919x11283, 7460x5642, 3730x2821, 1865x1411, 933x706, 467x353, 234x177
  Metadata:
    STATISTICS_MAXIMUM=36.300262451172
    STATISTICS_MEAN=-10.272119897872
    STATISTICS_MINIMUM=-86.068229675293
    STATISTICS_STDDEV=4.0615322980508
Band 2 Block=256x256 Type=Float32, ColorInterp=Undefined
  Min=-88.151 Max=31.867
  Minimum=-88.151, Maximum=31.867, Mean=-15.959, StdDev=5.270
  NoData Value=nan
  Overviews: 14919x11283, 7460x5642, 3730x2821, 1865x1411, 933x706, 467x353, 234x177
  Metadata:
    STATISTICS_MAXIMUM=31.86660194397
    STATISTICS_MEAN=-15.95944476309
    STATISTICS_MINIMUM=-88.151100158691
    STATISTICS_STDDEV=5.2701868900943

Using Geoserver version 2.12, the SLD renders the raster image as below. This is as expected. I am ignoring a slight issue with no data values.

enter image description here

Recently we've moved to Geoserver 2.15 and using the same SLD and same raster dataset, I receive a different result, previewing the WMS returns a "blank" image. Note getFeatureInfo requests appear to work.

enter image description here

Here are some of the errors reported in the geoserver catalina.out log

Mar 26, 2019 3:37:12 PM org.geoserver.GeoserverInitStartupListener$1 errorOccurred
INFO: Problem occurs when computing a tile by the owner.
java.lang.ClassCastException: [[B cannot be cast to [[F
        at it.geosolutions.jaiext.bandmerge.BandMergeOpImage.floatLoop(BandMergeOpImage.java:1228)

Mar 26, 2019 3:37:12 PM org.geoserver.GeoserverInitStartupListener$1 errorOccurred
INFO: Problem occurs when computing a tile by the owner.
java.lang.NullPointerException
        at it.geosolutions.jaiext.stats.SimpleStatsOpImage.computeTile(SimpleStatsOpImage.java:102)

Mar 26, 2019 3:37:12 PM org.geoserver.GeoserverInitStartupListener$1 errorOccurred
INFO: Problem occurs when computing a tile by the owner.
java.lang.IllegalArgumentException: The input argument(s) may not be null.
        at javax.media.jai.RasterAccessor.<init>(RasterAccessor.java:444)

Mar 26, 2019 3:37:12 PM org.geoserver.GeoserverInitStartupListener$1 errorOccurred
INFO: Problem occurs when computing a tile by the owner.
java.lang.NullPointerException
        at javax.media.jai.PlanarImage.getData(PlanarImage.java:2110)

26 Mar 15:37:12 ERROR [geoserver.ows] -
java.lang.NullPointerException
        at javax.media.jai.PlanarImage.getData(PlanarImage.java:2110)

I couldn't see anything related on Geoserver JIRA issue tracker and it feels like a bug in geoserver 2.15 since 2.12 appears to work.

Is there anything else I can try or should I raise an issue on the Geoserver JIRA?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.