geotrellis.raster.mapalgebra.zonal.ZonalMethods.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geotrellis-raster_2.11 Show documentation
Show all versions of geotrellis-raster_2.11 Show documentation
GeoTrellis is an open source geographic data processing engine for high performance applications.
The newest version!
package geotrellis.raster.mapalgebra.zonal
import geotrellis.raster._
import geotrellis.raster.summary._
import geotrellis.raster.histogram._
import geotrellis.util.MethodExtensions
trait ZonalMethods extends MethodExtensions[Tile] {
def zonalHistogramInt(zones: Tile): Map[Int, Histogram[Int]] =
IntZonalHistogram(self, zones)
def zonalStatisticsInt(zones: Tile): Map[Int, Statistics[Int]] =
IntZonalHistogram(self, zones)
.map { case (zone: Int, hist: Histogram[Int]) => (zone -> hist.statistics.get) }
.toMap
def zonalHistogramDouble(zones: Tile): Map[Int, Histogram[Double]] =
DoubleZonalHistogram(self, zones)
def zonalStatisticsDouble(zones: Tile): Map[Int, Statistics[Double]] =
DoubleZonalHistogram(self, zones)
.map { case (zone: Int, hist: Histogram[Double]) => (zone -> hist.statistics.get) }
.toMap
def zonalPercentage(zones: Tile): Tile =
ZonalPercentage(self, zones)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy