
geotrellis.spark.io.hadoop.HadoopLayerReindexer.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.hadoop
import geotrellis.spark._
import geotrellis.spark.io._
import geotrellis.util._
import org.apache.spark.SparkContext
import org.apache.hadoop.fs.Path
import spray.json.JsonFormat
import spray.json.DefaultJsonProtocol._
object HadoopLayerReindexer {
def apply(rootPath: Path, attributeStore: AttributeStore)(implicit sc: SparkContext): LayerReindexer[LayerId] =
GenericLayerReindexer[HadoopLayerHeader](
attributeStore = attributeStore,
layerReader = HadoopLayerReader(rootPath),
layerWriter = HadoopLayerWriter(rootPath),
layerDeleter = HadoopLayerDeleter(rootPath),
layerCopier = HadoopLayerCopier(rootPath)
)
def apply(attributeStore: HadoopAttributeStore)(implicit sc: SparkContext): LayerReindexer[LayerId] =
apply(attributeStore.rootPath, attributeStore)
def apply(rootPath: Path)(implicit sc: SparkContext): LayerReindexer[LayerId] =
apply(rootPath, HadoopAttributeStore(rootPath))
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy