Hi list,
I've been having issues with newer versions of Geoserver and its WMS
GetFeatureInfo requests (styles with ras:RasterAsPointCollection
transformation on ImageMosaic layers). As I was trying to get to the
bottom of it, I noticed the logs seem incorrect compared to the source
code (git repo). I've tried 2.22.2 and 2.23.0, where both GetFeatureInfo
requests of layers with said styles end up with a 'The image
"https://..." cannot be displayed because it contains errors'. 2.20.4
works fine. On either of the versions that produce the error, the logs have:
org.geoserver.platform.ServiceException: Failed to run GetFeatureInfo on
layer models:model_highcloud
*at org.geoserver.wms.GetFeatureInfo.execute(GetFeatureInfo.java:90)*
at org.geoserver.wms.GetFeatureInfo.run(GetFeatureInfo.java:42)
at
org.geoserver.wms.DefaultWebMapService.getFeatureInfo(DefaultWebMapService.java:266)
...
Caused by: java.lang.NullPointerException
at
com.sun.media.jai.iterator.RectIterCSM.setDataBuffer(RectIterCSM.java:71)
at
com.sun.media.jai.iterator.RectIterFallback.<init>(RectIterFallback.java:147)
at
com.sun.media.jai.iterator.RectIterCSM.<init>(RectIterCSM.java:36)
at
com.sun.media.jai.iterator.RectIterCSMFloat.<init>(RectIterCSMFloat.java:25)
at
javax.media.jai.iterator.RectIterFactory.create(RectIterFactory.java:83)
at
org.geotools.process.raster.RasterAsPointCollectionProcess$RasterAsPointFeatureIterator.<init>(RasterAsPointCollectionProcess.java:432)
at
org.geotools.process.raster.RasterAsPointCollectionProcess$RasterAsPointFeatureCollection.features(RasterAsPointCollectionProcess.java:385)
at
org.geotools.process.raster.RasterAsPointCollectionProcess$RasterAsPointFeatureCollection.features(RasterAsPointCollectionProcess.java:171)
at
org.geotools.data.store.FilteringFeatureCollection.features(FilteringFeatureCollection.java:118)
at
org.geotools.data.store.FilteringFeatureCollection.size(FilteringFeatureCollection.java:68)
at
org.geoserver.wms.GetFeatureInfo.addToResults(GetFeatureInfo.java:129)
at org.geoserver.wms.GetFeatureInfo.execute(GetFeatureInfo.java:80)
...
But the highlighted line at *GetFeatureInfo.java:90 *doesn't actually
have the ServiceException there (according to the 2.22.x and 2.23.x
branches of the geoserver repository). On 2.21.x and downwards I do see
the ServiceException being thrown at line 90.
Could somebody please enlighten me on what is going on in the logs or
what am I missing?
I will include the files required to create a minimalistic example for
the ImageMosaic layer & style.
Cheers,
Kamilla
SPI=org.geotools.data.postgis.PostgisNGJNDIDataStoreFactory
jndiReferenceName=java:comp/env/jdbc/postgres
schema=public
Loose\ bbox=true
Estimated\ extends=false
Connection\ timeout=10
preparedStatements=true
<StyledLayerDescriptor version="1.0.0"
xmlns="http://www.opengis.net/sld"
xmlns:gml="http://www.opengis.net/gml"
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/sld
./StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>grid_numbers</Name>
<UserStyle>
<Title>Grid Numbers</Title>
<FeatureTypeStyle>
<Transformation>
<ogc:Function name="ras:RasterAsPointCollection">
<ogc:Function name="parameter">
<ogc:Literal>data</ogc:Literal>
</ogc:Function>
<!--ogc:Function name="parameter">
<ogc:Literal>interpolation</ogc:Literal>
<ogc:Literal>InterpolationBilinear</ogc:Literal>
</ogc:Function-->
<ogc:Function name="parameter">
<ogc:Literal>scale</ogc:Literal>
<ogc:Function name="if_then_else">
<ogc:Function name="equalTo">
<ogc:Function name="env">
<ogc:Literal>wms_srs</ogc:Literal>
</ogc:Function>
<ogc:Literal>EPSG:3857</ogc:Literal>
</ogc:Function>
<ogc:Function name="Categorize">
<ogc:Function name="env">
<ogc:Literal>wms_scale_denominator</ogc:Literal>
</ogc:Function>
<ogc:Literal>4</ogc:Literal>
<ogc:Literal>200000</ogc:Literal>
<ogc:Literal>2</ogc:Literal>
<ogc:Literal>500000</ogc:Literal>
<ogc:Literal>1</ogc:Literal>
<ogc:Literal>1000000</ogc:Literal>
<ogc:Literal>0.5</ogc:Literal>
<ogc:Literal>2000000</ogc:Literal>
<ogc:Literal>0.2</ogc:Literal>
<ogc:Literal>5000000</ogc:Literal>
<ogc:Literal>0.1</ogc:Literal>
</ogc:Function>
<ogc:Literal>0.02</ogc:Literal>
</ogc:Function>
</ogc:Function>
</ogc:Function>
</Transformation>
<Rule>
<ogc:Filter>
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:Function name="env">
<ogc:Literal>single_colour</ogc:Literal>
<ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>true</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsNotEqualTo>
<ogc:PropertyName>GRAY_INDEX</ogc:PropertyName>
<ogc:Literal>-9999</ogc:Literal>
</ogc:PropertyIsNotEqualTo>
</ogc:And>
</ogc:Filter>
<TextSymbolizer>
<Label>
<ogc:Function name="round">
<ogc:PropertyName>GRAY_INDEX</ogc:PropertyName>
</ogc:Function>
</Label>
<Font>
<CssParameter name="font-family">Arial</CssParameter>
<CssParameter name="font-size">16</CssParameter>
<CssParameter name="font-style">normal</CssParameter>
<CssParameter name="font-weight">bold</CssParameter>
</Font>
<LabelPlacement>
<PointPlacement>
<AnchorPoint>
<AnchorPointX>0.5</AnchorPointX>
<AnchorPointY>0.5</AnchorPointY>
</AnchorPoint>
</PointPlacement>
</LabelPlacement>
<Fill>
<CssParameter name="fill">
<ogc:Function name="env">
<ogc:Literal>colour1</ogc:Literal>
<ogc:Literal>#000000</ogc:Literal>
</ogc:Function>
</CssParameter>
</Fill>
</TextSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Indexer>
<domains>
<domain name="time">
<attributes><attribute ref="timeCollector">time</attribute></attributes>
</domain>
</domains>
<schemas>
<schema name="default">
<attributes>*the_geom:Polygon,location:String,time:java.util.Date</attributes>
</schema>
</schemas>
<coverages>
<coverage>
<name>model_highcloud</name>
<schema ref="default"></schema>
<domains>
<domain ref="time"/>
</domains>
</coverage>
</coverages>
<collectors>
<collector name="timeCollector">
<!-- wrf_d01_relhum_2m_20210414T060000_f24.tiff -->
<value>regex=([0-9]{8}T[0-9]{6}).tiff,format=yyyyMMdd'T'HHmmss,fullPath=true</value>
<spi>TimestampFileNameExtractorSPI</spi>
<mapped>time</mapped>
</collector>
</collectors>
<parameters>
<parameter name="AbsolutePath" value="true" />
<parameter name="Caching" value="false" />
<parameter name="CanBeEmpty" value="false" />
<parameter name="IndexingDirectories" value="/opt/geoserver_data/data/models/mosaic/model_highcloud/" />
<parameter name="Name" value="model_highcloud" />
<parameter name="Recursive" value="true" />
<parameter name="TimeAttribute" value="time" />
</parameters>
</Indexer>
_______________________________________________
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
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users