Jose,
In digging into this a little, I was disappointed that I could not recreate the issue you are seeing. Your ingest code snippet looks great, although it does appear to be based on an older version of geowave than I had tested with. That being said I don't think the underlying raster implementation likely changed so again I am disappointed that I can't recreate it. We have been working 0.9.1 on a '0.9.1' branch and are closing in on our release (we merged the '0.9.1' dev branch in with master around the middle of last week, look out for the 0.9.1 release in the next couple days, we'll send an announcement to the list).
So the behavior that I see which seems a bit different than the png's that you provided, is that it just works when there is a matching resolution tile set with the zoom level in open layers preview. Then when I zoom in too tight, beyond the original resolution image, or when I zoom out to the point that it will be scaling the lowest resolution pyramid, there is an issue with scaling where the underlying color model of the scaled images do not match the original color model. I suspected the issue could be traced to significant changes that have been undergone in geotools 14.x integrating JAI-EXT into geotools for raster operations:
https://osgeo-org.atlassian.net/browse/GEOT-5061GeoWave stores the original image as tiles (optionally building an image pyramid on ingest). The appropriate tiles are quickly retrieved from GeoWave and the resultant WMS request is composed using a mosaic'ing approach that is very closely related to the 'imagemosaic' geotools extension. So having discovered this change:
https://github.com/geotools/geotools/blame/42c4cc0c3d850b1dea50c07108f171aace35a798/modules/plugin/imagemosaic-jdbc/src/main/java/org/geotools/gce/imagemosaic/jdbc/AbstractThread.java#L101And applying it to GeoWave, the scaling now works. We strive to maintain support for the latest release and the previous one for all of our dependencies which is constantly a challenge. We test those variations by applying a very large build matrix on our own jenkins CI but also a smaller subset in travis CI (
https://github.com/ngageoint/geowave/blob/master/.travis.yml). This made it very difficult to support raster operations for geotools 13.x and 14.x simultaneously given the scale of the JAI-EXT changes. For 0.9.1 we'd like to update that support to 15.x and 14.x so we can move forward with the implications of these changes.
Here's the PR that will fix the scaling issue (as well as add a method RasterUtils.forceRenderingHints() that will give a user an opportunity to override the rendering hints that we apply by default in the case as you were running into that you may want to apply a lenient datum shift or some other less common hint).
https://github.com/ngageoint/geowave/compare/GEOWAVE-760?expand=1Regarding multi-band, keep in mind the current capability is to handle the multi-band exactly as it is ingested. So if you have many bands, it will retain the bands exactly and not subset bands. The question that you had as I understood it is that you wanted to ingest a mutli-band image and have it automatically separate the bands out into completely different coverages. I see that as a reasonable use case - and I also see as a reasonable use case the inverse operation of combining bands into the same coverage when the ingested data is separated by band. I think there will be new hooks within geowave in the near future to allow many of these operations. We will be picking this issue back up again in our next release cycle and will be continuing to flesh out any common use cases:
https://github.com/ngageoint/geowave/issues/346 (there is a branch that has most of the code completed for this issue, but needs to be brought up to speed with the latest GeoWave). Anyways, I did just want to clarify what is meant by multi-band support. I think the most basic use case is that exactly the bands ingested are how GeoWave presents the data, and an extension to that which we will work is splitting and merging bands between coverages.
Please try the latest with this pull request and let us know if you have any issue.
Rich