
geotrellis.spark.io.slippy.SlippyTileReader.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.10 Show documentation
Show all versions of geotrellis-spark_2.10 Show documentation
GeoTrellis is an open source geographic data processing engine for high performance applications.
The newest version!
package geotrellis.spark.io.slippy
import geotrellis.vector._
import geotrellis.raster._
import geotrellis.raster.io.geotiff._
import geotrellis.spark._
import geotrellis.spark.io.hadoop._
import geotrellis.spark.io.hadoop.formats._
import geotrellis.util.Filesystem
import org.apache.commons.io.FileUtils
import org.apache.commons.io.filefilter._
import org.apache.spark._
import org.apache.spark.rdd._
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.mapreduce.Job
import org.apache.hadoop.mapreduce.{InputSplit, TaskAttemptContext}
import org.apache.hadoop.fs.Path
import java.io.File
import scala.collection.JavaConversions._
trait SlippyTileReader[T] {
def read(zoom: Int)(implicit sc: SparkContext): RDD[(SpatialKey, T)]
def read(zoom: Int, key: SpatialKey): T
def read(zoom: Int, x: Int, y: Int): T =
read(zoom, SpatialKey(x, y))
}
object SlippyTileReader {
val TilePath = """.*/(\d+)/(\d+)\.\w+$""".r
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy