All Downloads are FREE. Search and download functionalities are using the official Maven repository.

geotrellis.spark.tiling.FloatingLayoutScheme.scala Maven / Gradle / Ivy

Go to download

GeoTrellis is an open source geographic data processing engine for high performance applications.

The newest version!
package geotrellis.spark.tiling


import geotrellis.raster._
import geotrellis.vector.{Extent, ProjectedExtent}

object FloatingLayoutScheme {
  val DEFAULT_TILE_SIZE = 256

  def apply(): FloatingLayoutScheme =
    apply(DEFAULT_TILE_SIZE)

  def apply(tileSize: Int): FloatingLayoutScheme =
    apply(tileSize, tileSize)

  def apply(tileCols: Int, tileRows: Int): FloatingLayoutScheme =
    new FloatingLayoutScheme(tileCols, tileRows)
}

class FloatingLayoutScheme(tileCols: Int, tileRows: Int) extends LayoutScheme {
  def levelFor(extent: Extent, cellSize: CellSize) =
    0 -> LayoutDefinition(GridExtent(extent, cellSize), tileCols, tileRows)

  // TODO: Fix type system so that there is no runtime error
  def zoomOut(level: LayoutLevel) =
    throw new UnsupportedOperationException("zoomOut not supported for FloatingLayoutScheme")

  def zoomIn(level: LayoutLevel) =
    throw new UnsupportedOperationException("zoomIn not supported for FloatingLayoutScheme")
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy