You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Savings a streaming MultibandGeoTiff creates a corrupted geotiff #2177
Issue cannot be reproduced in 1.1.0-RC2 but still does not work due to another issue where we just never return.
The following code produces the error above:
package com.agrian.analytics.ingest
import geotrellis.raster.io.geotiff.MultibandGeoTiff
import geotrellis.spark.io.http.util.HttpRangeReader
import geotrellis.util.StreamingByteReader
import scalaj.http.Http
import com.typesafe.scalalogging.LazyLogging
object TestApp extends LazyLogging {
def main(args: Array[String]): Unit = {
val s3Link = "https://s3-us-west-2.amazonaws.com/vtpkmsdybsdflk/1056026_2017-03-02_RE2_3A.tif"
val streamer = HttpRangeReader.withoutHeadRequest(s3Link)
val reader = StreamingByteReader(streamer)
MultibandGeoTiff.streaming(reader).write("streamed_basetile.tiff")
}
}
If you run gdalinfo basetile.tiff -hist -stats you get the resulting info:
Warning 1: LZWDecode:LZWDecode: Strip 515 not terminated with EOI code
ERROR 1: LZWDecode:Not enough data at scanline 515 (short 1179 bytes)
ERROR 1: TIFFReadEncodedStrip() failed.
ERROR 1: basetile.tiff, band 1: IReadBlock failed at X offset 0, Y offset 515
Some additional notes, if you change the MultibandGeoTiff.streaming(reader).write("streamed_basetile.tiff") line to:
changed the title [-]MalformedGeoTiffException: incorrect byte order produced from streaming geotiff[/-][+]Savings a streaming MultibandGeoTiff creates a corrupted geotiff[/+]on May 4, 2017
Activity
[-]MalformedGeoTiffException: incorrect byte order produced from streaming geotiff[/-][+]Savings a streaming MultibandGeoTiff creates a corrupted geotiff[/+]Fixes for locationtech#2177
Fixes for locationtech#2177