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

geotrellis.raster.op.local.Log.scala Maven / Gradle / Ivy

The newest version!
package geotrellis.raster.op.local

import geotrellis._

/**
 * Computes the Log of Raster or single values.
 */
object Log extends Serializable {
  /** Computes the Log of a Raster. */
  def apply(r:Op[Raster]) =
    r.map(_.dualMap(z => if(isNoData(z)) z else math.log(z).toInt)(math.log(_)))
     .withName("Log")
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy