
geotrellis.spark.io.GenericLayerMover.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.io
import geotrellis.spark._
import geotrellis.spark.io.avro._
import geotrellis.spark.io.json._
import geotrellis.util._
import spray.json._
import scala.reflect.ClassTag
class GenericLayerMover[ID](layerCopier: LayerCopier[ID], layerDeleter: LayerDeleter[ID]) extends LayerMover[ID] {
def move[
K: AvroRecordCodec: Boundable: JsonFormat: ClassTag,
V: AvroRecordCodec: ClassTag,
M: JsonFormat: GetComponent[?, Bounds[K]]
](from: ID, to: ID): Unit = {
layerCopier.copy[K, V, M](from, to)
layerDeleter.delete(from)
}
}
object GenericLayerMover {
def apply[ID](layerCopier: LayerCopier[ID], layerDeleter: LayerDeleter[ID]) =
new GenericLayerMover(layerCopier, layerDeleter)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy