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

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

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

import geotrellis._

/**
 * Operation to get the flooring of values.
 */
object Floor extends Serializable {
  /** Takes the Flooring of each raster cell value. */
  def apply(r:Op[Raster]) = 
    r.map(_.dualMap(z => z)(z => math.floor(z))) // math.floor(Double.NaN) == Double.NaN
     .withName("Floor")
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy