Announcement

Collapse
No announcement yet.

TIFF file is missing a required tag StripOffsets

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • TIFF file is missing a required tag StripOffsets


    Hello. There was such a problem: working with some * .tiff, when trying to get DataRaster [] using the readDataRaster () method, an exception is thrown:
    ERROR j.l.Throwable - java.io.IOException: TIFF file is missing a required tag StripOffsets
    Below is the code that works with * .tiff.
    Code:
    private GeotiffReader reader;
    private ByteBufferRaster raster;
    ...
    reader = new GeotiffReader(file);
    listDataRaster.add(reader.readDataRaster());
    ...
    DataRaster[] dataRaster = listDataRaster.get(iter);
    raster = (ByteBufferRaster)dataRaster[0];
    ...
    raster.setDoubleAtPosition(y, x, value);
    My task is to take the * .tiff ByteBufferRaster and then use setDoubleAtPosition to make changes to the grid after some calculations and rewrite * .tiff. How do I fix this error? And if not, are there other ways to accomplish my task?

  • #2
    Sending the tiff file over would help... too big ? Confidential data ?
    Remember also you can manipulate tiff files with the gdal tools.

    Comment

    Working...
    X