The problem I am facing is part of more complex workflow, but I believe that it could be simplified to this simple case. I have a tif image file and I am reading it from disk to Product like this:
java.io.File file = new java.io.File(outFilePath); Product inProduct = CommonReaders.readProduct(file);
The inProduct variable seems fine, it has band, dimensions and so. Now I just try to save it to other location on disk like this:
ProductIO.writeProduct(inProduct, "d:\\desktop\\test.tif", "GeoTIFF");
The resulting file is created, it has correct dimensions, resolution, but it has no data, it is all zeros. What am I doing wrong?