Hi
I try to apply some contrast enhancement to a geotiff file but I get some
null pointer exceptions. This happens with GeoServer 2.24.2 and 2.25.0. Any
idea what goes wrong? Perhaps not a supported compression or something
similar? The sld works without the ContrastEnhancement section or without
the ColorMap. Thanks.
Stefan
sld:
<Rule>
<Name>rule1</Name>
<Title>Opaque Raster</Title>
<Abstract>A raster with 100% opacity</Abstract>
<RasterSymbolizer>
<Opacity>1.0</Opacity>
<ColorMap type="ramp">
<ColorMapEntry color="#FFFFFF" quantity="-9999" label="-"
opacity="0"/>
<ColorMapEntry color="#FFFFFF" quantity="0" opacity="1"/>
<ColorMapEntry color="#000000" quantity="255" opacity="1"/>
</ColorMap>
<ContrastEnhancement>
<Normalize>
<VendorOption
name="algorithm">StretchToMinimumMaximum</VendorOption>
<VendorOption name="minValue">50</VendorOption>
<VendorOption name="maxValue">100</VendorOption>
</Normalize>
</ContrastEnhancement>
</RasterSymbolizer>
</Rule>
gdalinfo:
Data axis to CRS axis mapping: 1,2
Origin = (2592000.000000000000000,1262000.000000000000000)
Pixel Size = (0.500000000000000,-0.500000000000000)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
COMPRESSION=DEFLATE
INTERLEAVE=BAND
LAYOUT=COG
PREDICTOR=3
Corner Coordinates:
Upper Left ( 2592000.000, 1262000.000) ( 7d20' 0.15"E, 47d30'36.32"N)
Lower Left ( 2592000.000, 1213000.000) ( 7d20' 3.30"E, 47d 4' 9.51"N)
Upper Right ( 2645000.000, 1262000.000) ( 8d 2'13.18"E, 47d30'30.94"N)
Lower Right ( 2645000.000, 1213000.000) ( 8d 1'55.48"E, 47d 4' 4.17"N)
Center ( 2618500.000, 1237500.000) ( 7d41' 3.03"E, 47d17'22.18"N)
Band 1 Block=512x512 Type=Float32, ColorInterp=Gray
Overviews: 53000x49000, 26500x24500, 13250x12250, 6625x6125, 3312x3062,
1656x1531, 828x765, 414x382
exception:
12 Apr 18:11:31 ERROR [geoserver.ows] -
java.lang.NullPointerException
at javax.media.jai.PlanarImage.getData(PlanarImage.java:2110)
at javax.media.jai.PlanarImage.getData(PlanarImage.java:2016)
at javax.media.jai.RenderedOp.getData(RenderedOp.java:2266)
at
org.geoserver.wms.map.RenderedImageTimeDecorator.getData(RenderedImageTimeDecorator.java:129)
at
it.geosolutions.imageio.plugins.png.ScanlineProviderFactory.getProvider(ScanlineProviderFactory.java:54)
at
it.geosolutions.imageio.plugins.png.PNGWriter.isScanlineSupported(PNGWriter.java:128)
at org.geoserver.wms.map.png.PNGJWriter.writePNG(PNGJWriter.java:34)
at
org.geoserver.wms.map.PNGMapResponse.formatImageOutputStream(PNGMapResponse.java:101)
at
org.geoserver.wms.map.RenderedImageMapResponse.write(RenderedImageMapResponse.java:110)
at org.geoserver.ows.Dispatcher.response(Dispatcher.java:1018)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:272)
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users