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

geotrellis.data.IntReadState.scala Maven / Gradle / Ivy

The newest version!
package geotrellis.data

import geotrellis._
import geotrellis.raster.MutableRasterData

trait IntReadState extends ReadState {
  // must override
  def getNoDataValue:Int

  protected[this] override def translate(data:MutableRasterData) {
    var i = 0
    val len = data.length
    val nd = getNoDataValue
    while (i < len) {
      if (data(i) == nd) data(i) = NODATA
      i += 1
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy