abstract class Tile extends CellGrid[Int] with IterableTile with MappableTile[Tile]
Base trait for a Tile.
- Alphabetic
- By Inheritance
- Tile
- MappableTile
- MacroMappableTile
- IterableTile
- MacroIterableTile
- CellGrid
- GridIntegral
- Grid
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Tile()
Abstract Value Members
-
abstract
def
cellType: CellType
- Definition Classes
- CellGrid
-
abstract
def
cols: Int
cols and rows are explicitly defined to help with the Grid[N].{cols | rows} specialized functions dispatch.
-
abstract
def
combine(r2: Tile)(f: (Int, Int) ⇒ Int): Tile
Combine the given Tile with the present one using the given function.
-
abstract
def
combineDouble(r2: Tile)(f: (Double, Double) ⇒ Double): Tile
Combine the given Tile with the present one using the given function.
-
abstract
def
convert(cellType: CellType): Tile
Converts the cell type of the tile.
Converts the cell type of the tile.
- Note
This will immediately iterate over the tile and allocate a new copy of data; this should be a performance consideration.
-
abstract
def
foreach(f: (Int) ⇒ Unit): Unit
Execute the given function at each pixel of the present Tile.
-
abstract
def
foreachDouble(f: (Double) ⇒ Unit): Unit
Execute the given function at each pixel of the present Tile.
-
abstract
def
foreachDoubleVisitor(visitor: macros.DoubleTileVisitor): Unit
- Definition Classes
- MacroIterableTile
-
abstract
def
foreachIntVisitor(visitor: macros.IntTileVisitor): Unit
- Definition Classes
- MacroIterableTile
-
abstract
def
get(col: Int, row: Int): Int
Get value at given coordinates.
-
abstract
def
getDouble(col: Int, row: Int): Double
Get value at given coordinates.
-
abstract
def
interpretAs(newCellType: CellType): Tile
Changes the interpretation of the tile cells through changing NoData handling and optionally cell data type.
Changes the interpretation of the tile cells through changing NoData handling and optionally cell data type. If DataType portion of the CellType is unchanged the tile data is not duplicated through conversion. If cell DataType conversion is required it is done in a naive way, without considering NoData handling.
- newCellType
CellType to be used in interpreting existing cells
-
abstract
def
map(f: (Int) ⇒ Int): Tile
Map the given function across the present Tile.
Map the given function across the present Tile. The result is another Tile.
Values can also be mapped with "class-break logic":
import geotrellis.raster.render.BreakMap // Maps break values to result values val m: Map[Int, Int] = ... val t: Tile = ... // BreakMap extends `Function1` t.map(BreakMap.i2i(m))
If
Tile
above had an underlying floating CellType, then the transformation would effectively be fromDouble => Int
. -
abstract
def
mapDouble(f: (Double) ⇒ Double): Tile
Map the given function across the present Tile.
Map the given function across the present Tile. The result is another Tile.
Values can also be mapped with "class-break logic":
import geotrellis.raster.render.BreakMap // Maps break values to result values val m: Map[Double, Double] = ... val t: Tile = ... // BreakMap extends `Function1` t.mapDouble(BreakMap.i2i(m))
If
Tile
above had an underlying integer CellType, then the transformation would effectively be fromInt => Double
. -
abstract
def
mapDoubleMapper(mapper: macros.DoubleTileMapper): Tile
- Definition Classes
- MacroMappableTile
-
abstract
def
mapIntMapper(mapper: macros.IntTileMapper): Tile
- Definition Classes
- MacroMappableTile
-
abstract
def
mutable: MutableArrayTile
Returns a mutable instance of this tile.
Returns a mutable instance of this tile.
- Note
When the underlying class is an instance of MutableArrayTile it will return itself without performing a copy. This is used internally as a performance optimization when the ownership of the tile is controlled.
- abstract def rows: Int
-
abstract
def
toArray(): Array[Int]
Return the data behind this Tile, or a copy, as an Array of integers.
-
abstract
def
toArrayDouble(): Array[Double]
Return the data behind this Tile, or a copy, as an Array of doubles.
- abstract def toArrayTile(): ArrayTile
-
abstract
def
toBytes(): Array[Byte]
Return the data behind this Tile, or a copy, as an Array of bytes.
- abstract def withNoData(noDataValue: Option[Double]): Tile
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
dimensions: Dimensions[Int]
- Definition Classes
- GridIntegral → Grid
-
def
downsample(newCols: Int, newRows: Int)(f: (CellSet) ⇒ Int): Tile
Reduce the resolution of the present Tile to the given number of columns and rows.
Reduce the resolution of the present Tile to the given number of columns and rows. A new Tile is returned.
- newCols
The number of columns in the new Tile
- newRows
The number of rows in the new Tile
-
def
dualCombine(r2: Tile)(f: (Int, Int) ⇒ Int)(g: (Double, Double) ⇒ Double): Tile
Combine two Tiles together using one of two given functions.
Combine two Tiles together using one of two given functions. If the union of the types of the two cells is floating-point, then the floating function is used, otherwise the integer function is used.
- r2
The tile to combine with the present one
- f
The integer function
- g
The double function
-
def
dualForeach(f: (Int) ⇒ Unit)(g: (Double) ⇒ Unit): Unit
Execute a function at each pixel of a Tile.
Execute a function at each pixel of a Tile. Two functions are given: an integer version which is used if the tile is an integer-tile, and the other in the case of a floating-tile.
- f
A function from Int to Unit
- g
A function from Double to Unit
-
def
dualMap(f: (Int) ⇒ Int)(g: (Double) ⇒ Double): Tile
Map one of the two given functions across the Tile to produce a new one.
Map one of the two given functions across the Tile to produce a new one. One of the functions is from Int to Int, and the other from Double to Double.
- f
A function from Int to Int
- g
A function from Double to Double
-
def
dualMapIfSet(f: (Int) ⇒ Int)(g: (Double) ⇒ Double): Tile
Conditionally map across the Tile with one of two functions, depending on whether the tile is an integer- or a floating-tile.
Conditionally map across the Tile with one of two functions, depending on whether the tile is an integer- or a floating-tile. A pixel is mapped only if it is set.
- f
A function from Int to Int
- g
A function from Double to Double
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
findMinMax: (Int, Int)
Return tuple of highest and lowest value in raster.
Return tuple of highest and lowest value in raster.
- Note
Currently does not support double valued raster data types (FloatConstantNoDataCellType, DoubleConstantNoDataCellType). Calling findMinMax on rasters of those types will give the integer min and max of the rounded values of their cells.
-
def
findMinMaxDouble: (Double, Double)
Return tuple of highest and lowest value in raster.
-
macro
def
foreach(f: (Int, Int, Int) ⇒ Unit): Unit
Execute the given function 'f' at every location in the tile.
Execute the given function 'f' at every location in the tile. The function 'f' takes the column, row, and value and returns nothing (presumably for side-effects).
- Definition Classes
- IterableTile
-
macro
def
foreachDouble(f: (Int, Int, Double) ⇒ Unit): Unit
Execute the given function 'f' at every location in the tile.
Execute the given function 'f' at every location in the tile. The function 'f' takes the column, row, and value, the last one as a double, and returns nothing (presumably for side-effects).
- Definition Classes
- IterableTile
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isNoDataTile: Boolean
-
macro
def
map(f: (Int, Int, Int) ⇒ Int): Tile
Map over the tiles using a function which accepts the column, row, and value at that position and returns an integer.
Map over the tiles using a function which accepts the column, row, and value at that position and returns an integer.
- Definition Classes
- MappableTile
-
macro
def
mapDouble(f: (Int, Int, Double) ⇒ Double): Tile
Map over the tiles using a function which accepts the column, row, and value at that position and returns a double.
Map over the tiles using a function which accepts the column, row, and value at that position and returns a double.
- Definition Classes
- MappableTile
-
def
mapIfSet(f: (Int) ⇒ Int): Tile
Conditionally execute (or don't) the given function at each pixel of a Tile, depending on whether that pixel is NODATA or not.
Conditionally execute (or don't) the given function at each pixel of a Tile, depending on whether that pixel is NODATA or not. The result of the mapping is returned as a tile.
- f
A function from Int to Int
-
def
mapIfSetDouble(f: (Double) ⇒ Double): Tile
Conditionally execute (or don't) the given function at each pixel of a Tile, depending on whether that pixel is NODATA or not.
Conditionally execute (or don't) the given function at each pixel of a Tile, depending on whether that pixel is NODATA or not. The result of the mapping is returned as a tile.
- f
A function from Double to Double
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
normalize(oldMin: Double, oldMax: Double, newMin: Double, newMax: Double): Tile
Normalizes the values of this raster, given the current min and max, to a new min and max.
Normalizes the values of this raster, given the current min and max, to a new min and max.
- oldMin
Old minimum value
- oldMax
Old maximum value
- newMin
New minimum value
- newMax
New maximum value
-
def
normalize(oldMin: Int, oldMax: Int, newMin: Int, newMax: Int): Tile
Normalizes the values of this raster, given the current min and max, to a new min and max.
Normalizes the values of this raster, given the current min and max, to a new min and max.
- oldMin
Old minimum value
- oldMax
Old maximum value
- newMin
New minimum value
- newMax
New maximum value
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
rescale(newMin: Double, newMax: Double): Tile
Rescale the values in this Tile so that they are between the two given values.
-
def
rescale(newMin: Int, newMax: Int): Tile
Rescale the values in this Tile so that they are between the two given values.
-
def
size: Int
- Definition Classes
- GridIntegral → Grid
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()