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

geotrellis.source.RasterDefinition.scala Maven / Gradle / Ivy

The newest version!
package geotrellis.source

import geotrellis._
import geotrellis.process.LayerId
import geotrellis.raster.TileLayout

case class RasterDefinition(layerId:LayerId,
                            rasterExtent:RasterExtent,
                            tileLayout:TileLayout,
                            rasterType:RasterType,
                            catalogued:Boolean = true) {
  def isTiled = tileLayout.isTiled

  def withType(newType:RasterType) = 
    RasterDefinition(layerId, rasterExtent, tileLayout, newType)
}

object RasterDefinition {
  def fromRaster(r: Raster): RasterDefinition = 
    RasterDefinition(
      LayerId.MEM_RASTER,
      r.rasterExtent,
      TileLayout.singleTile(r.rasterExtent),
      r.rasterType,
      false)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy