
geotrellis.spark.summary.polygonal.PolygonalSummaryFeatureRDDMethods.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geotrellis-spark_2.11 Show documentation
Show all versions of geotrellis-spark_2.11 Show documentation
GeoTrellis is an open source geographic data processing engine for high performance applications.
The newest version!
package geotrellis.spark.summary.polygonal
import geotrellis.vector._
import geotrellis.vector.summary.polygonal._
import org.apache.spark.rdd._
import reflect.ClassTag
trait PolygonalSummaryFeatureRDDMethods[G <: Geometry, D] {
val featureRdd: RDD[Feature[G, D]]
def polygonalSummary[T: ClassTag](polygon: Polygon, zeroValue: T)(handler: PolygonalSummaryHandler[G, D, T]): T =
featureRdd.aggregate(zeroValue)(handler.mergeOp(polygon, zeroValue), handler.combineOp)
def polygonalSummary[T: ClassTag](multiPolygon: MultiPolygon, zeroValue: T)(handler: PolygonalSummaryHandler[G, D, T]): T =
featureRdd.aggregate(zeroValue)(handler.mergeOp(multiPolygon, zeroValue), handler.combineOp)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy