NASAWorldWind / WorldWindServerKit

The NASA WorldWind Server Kit (WWSK) is an open source Java project that assembles GeoServer for easy distribution and implementation.
95 stars 54 forks source link

ArrayIndexOutOfBoundsException thrown by OgcGeoPackageReader #2

Closed emxsys closed 7 years ago

emxsys commented 7 years ago

An ArrayIndexOutOfBoundsException is thrown by OgcGeoPackageReader when attempting to render a NSG Profile GeoPackage provided by the AGC. When this exception occurs the map is not rendered.

org.geoserver.platform.ServiceException: Error rendering coverage on the fast path
        at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:353)
        at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:268)
        at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:138)
        at org.geoserver.wms.GetMap.executeInternal(GetMap.java:623)
        at org.geoserver.wms.GetMap.run(GetMap.java:279)
. . .
Caused by: java.lang.ArrayIndexOutOfBoundsException: 768
        at sun.awt.image.ByteInterleavedRaster.putByteData(ByteInterleavedRaster.java:814)
        at sun.awt.image.ByteInterleavedRaster.setDataElements(ByteInterleavedRaster.java:675)
        at sun.awt.image.ByteInterleavedRaster.setDataElements(ByteInterleavedRaster.java:648)
        at sun.awt.image.ByteInterleavedRaster.setRect(ByteInterleavedRaster.java:1180)
        at gov.nasa.worldwind.geopkg.mosaic.OgcGeoPackageReader.read(OgcGeoPackageReader.java:162)
emxsys commented 7 years ago

Fixed the OgcGeoPackageReader to merge tiles into a mosaic irrespective of the image type of the individual tiles.