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

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

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

import geotrellis._

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy