All Downloads are FREE. Search and download functionalities are using the official Maven repository.

geotrellis.raster.io.geotiff.ByteGeoTiffSegmentCollection.scala Maven / Gradle / Ivy

Go to download

GeoTrellis is an open source geographic data processing engine for high performance applications.

The newest version!
package geotrellis.raster.io.geotiff

import geotrellis.raster._
import geotrellis.raster.io.geotiff.compression._

trait ByteGeoTiffSegmentCollection extends GeoTiffSegmentCollection {
  type T = ByteGeoTiffSegment

  val bandType = ByteBandType
  val noDataValue: Option[Byte]

  lazy val createSegment: Int => ByteGeoTiffSegment = noDataValue match {
    case None =>
      { i: Int => new ByteRawGeoTiffSegment(getDecompressedBytes(i)) }
    case Some(nd) if (nd == Short.MinValue) =>
      { i: Int => new ByteConstantNoDataCellTypeGeoTiffSegment(getDecompressedBytes(i)) }
    case Some(nd) =>
      { i: Int => new ByteUserDefinedNoDataGeoTiffSegment(getDecompressedBytes(i), nd) }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy