Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
1.1.1
Description
In line 182 of the file [GeotiffSchema.scala|https://github.com/apache/incubator-sedona/blob/master/sql/src/main/scala/org/apache/spark/sql/sedona_sql/io/GeotiffSchema.scala,] it is calculating the offset position of a pixel band value. The offset calculation is wrong. The correct offset should be:
val offset = i * width + j + width * height * bandId
I compared the band values returned by Apache Sedona with the band values returned by Python rasterio library for the same geotiff image. If the offset values are calculated following the above formula, band values returned by Apache Sedona match with the band values returned by rasterio librray.
Attachments
Issue Links
- links to