geotrellis.raster.io.geotiff.BitGeoTiffSegmentCollection.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geotrellis-raster_2.11 Show documentation
Show all versions of geotrellis-raster_2.11 Show documentation
GeoTrellis is an open source geographic data processing engine for high performance applications.
The newest version!
package geotrellis.raster.io.geotiff
import geotrellis.raster._
trait BitGeoTiffSegmentCollection extends GeoTiffSegmentCollection {
type T = BitGeoTiffSegment
val bandType = BitBandType
val segmentLayout: GeoTiffSegmentLayout
val bandCount: Int
val hasPixelInterleave: Boolean
val createSegment: Int => BitGeoTiffSegment = { i =>
val (segmentCols, segmentRows) = segmentLayout.getSegmentDimensions(i)
// val size = segmentCols * segmentRows
val cols = {
val c = segmentLayout.tileLayout.tileCols
if(hasPixelInterleave) c * bandCount
else c
}
val rows = if(segmentLayout.isStriped) { segmentRows } else { segmentLayout.tileLayout.tileRows }
new BitGeoTiffSegment(getDecompressedBytes(i), cols, rows)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy