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

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

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

import geotrellis._
import geotrellis.process._

/**
 * Negate (multiply by -1) each value in a raster.
 */
object Negate extends Serializable {
  def apply(r:Op[Raster]) = 
    r.map(_.dualMap(z => if(isNoData(z)) z else -z)
                   (z => if(isNoData(z)) z else -z))
     .withName("Negate[Raster]")
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy