Hi again, I've found some more details on this issue, and it looks like this might be relevant for EO band layers in general.
The band layers that I'm displaying are originally stored in the 'short' datatype. So I get a resulting image with three bands of datatype short. JAI can not create a default colormodel for such an image, hence the colormodel is null. It seems like this should be fixed in the ViewsManager.photographic method, as this is where the exception happens, and this method is in fact responsible for generating a decent photographic representation, as its name seems to imply. To do this however, the short values would need to be rescaled to byte values. This can't be done automatically, as the rescaling parameters depend on the specific EO band. Would it make sense if I try to add this to the WMS-EO plugin? I already tried to do a hard coded rescale locally, and it seems to produce a good result. thanks, Jeroen On Wednesday 18 December 2013 11:07:51 Dries Jeroen wrote: > Hi all, > > I'm using the WMS-EO community model to create a layer from an eo data > source which should merge three bands into a single rgb image. > > However, I'm getting a nullpointerException in ViewsManager.photographic > because the colormodel of the bandmerged image is null. > > The code that generates this image can be found in > org.geotools.gce.imagemosaic.MergeBehavior, and does not explicitly specify > a colormodel for the resulting image. > > Does anyone now how this code was originally intended to work? Would it be a > good solution to simply supply an imagelayout using rendering hints? > > Any information is helpfull, I'll provide a patch if I find a good solution. > > thanks, > Jeroen > VITO Disclaimer: http://www.vito.be/e-maildisclaimer > > ---------------------------------------------------------------------------- > -- Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics > Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > GeoTools-Devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-devel VITO Disclaimer: http://www.vito.be/e-maildisclaimer ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ GeoTools-Devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
