abstract class RasterSource extends CellGrid[Long] with RasterMetadata
Single threaded instance of a reader that is able to read windows from larger raster. Some initilization step is expected to provide metadata about source raster
- Alphabetic
- By Inheritance
- RasterSource
- RasterMetadata
- CellGrid
- GridIntegral
- Grid
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new RasterSource()
Abstract Value Members
-
abstract
def
attributes: Map[String, String]
Return the "base" metadata, usually it is a zero band metadata, a metadata that is valid for the entire source and for the zero band
Return the "base" metadata, usually it is a zero band metadata, a metadata that is valid for the entire source and for the zero band
- Definition Classes
- RasterMetadata
-
abstract
def
attributesForBand(band: Int): Map[String, String]
Return a per band metadata
Return a per band metadata
- Definition Classes
- RasterMetadata
-
abstract
def
bandCount: Int
- Definition Classes
- RasterMetadata
-
abstract
def
cellType: CellType
- Definition Classes
- RasterMetadata
- abstract def convert(targetCellType: TargetCellType): RasterSource
-
abstract
def
crs: CRS
- Definition Classes
- RasterMetadata
-
abstract
def
gridExtent: GridExtent[Long]
- Definition Classes
- RasterMetadata
-
abstract
def
metadata: RasterMetadata
All available RasterSource metadata
-
abstract
def
name: SourceName
Source name, that can be a path or any name that is associated with Raster
Source name, that can be a path or any name that is associated with Raster
- Definition Classes
- RasterMetadata
-
abstract
def
read(bounds: GridBounds[Long], bands: Seq[Int]): Option[Raster[MultibandTile]]
Reads a window for pixel bounds.
Reads a window for pixel bounds. Return extent may be smaller than requested extent around raster edges. May return None if the requested extent does not overlap the raster extent.
- Annotations
- @throws( "if requested bands do not exist" )
-
abstract
def
read(extent: Extent, bands: Seq[Int]): Option[Raster[MultibandTile]]
Reads a window for the extent.
Reads a window for the extent. Return extent may be smaller than requested extent around raster edges. May return None if the requested extent does not overlap the raster extent.
- Annotations
- @throws( "if requested bands do not exist" )
- abstract def resample(resampleTarget: ResampleTarget, method: ResampleMethod, strategy: OverviewStrategy): RasterSource
-
abstract
def
resolutions: List[CellSize]
All available overview resolutions for this raster source
All available overview resolutions for this raster source
- For base RasterSource instance this will be resolutions of available overviews including the base resolution.
- For reprojected RasterSource these resolutions represent an estimate where each cell in target CRS has approximately the same geographic coverage as a cell in the source CRS.
For compatibility with OverviewStrategy, this list should be sorted from the most resolute cell size to the least resolute cell size, as determined by
_.resolution
.When reading raster data the underlying implementation will have to sample from one of these resolutions. It is possible that a read request for a small bounding box will results in significant IO request when the target cell size is much larger than closest available resolution.
- Definition Classes
- RasterMetadata
Concrete Value Members
-
def
cellSize: CellSize
Cell size at which rasters will be read when using this RasterSource
Cell size at which rasters will be read when using this RasterSource
Note: some re-sampling of underlying raster data may be required to produce this cell size.
- Definition Classes
- RasterMetadata
-
def
cols: Long
Raster pixel column count
Raster pixel column count
- Definition Classes
- RasterMetadata
-
def
convert(targetCellType: CellType): RasterSource
Converts the values within the RasterSource from one CellType to another.
Converts the values within the RasterSource from one CellType to another.
Note:
GDALRasterSource differs in how it converts data from the other RasterSources. Please see the convert docs for GDALRasterSource for more information.
-
def
dimensions: Dimensions[Long]
- Definition Classes
- GridIntegral → Grid
-
def
extent: Extent
- Definition Classes
- RasterMetadata
- def interpretAs(targetCellType: CellType): RasterSource
- def read(bands: Seq[Int]): Option[Raster[MultibandTile]]
- def read(): Option[Raster[MultibandTile]]
- def read(bounds: GridBounds[Long]): Option[Raster[MultibandTile]]
- def read(extent: Extent): Option[Raster[MultibandTile]]
- def readBounds(bounds: Traversable[GridBounds[Long]]): Iterator[Raster[MultibandTile]]
- def readBounds(bounds: Traversable[GridBounds[Long]], bands: Seq[Int]): Iterator[Raster[MultibandTile]]
- def readExtents(extents: Traversable[Extent]): Iterator[Raster[MultibandTile]]
- def readExtents(extents: Traversable[Extent], bands: Seq[Int]): Iterator[Raster[MultibandTile]]
-
def
reproject(targetCRS: CRS, resampleTarget: ResampleTarget = DefaultTarget, method: ResampleMethod = ResampleMethod.DEFAULT, strategy: OverviewStrategy = OverviewStrategy.DEFAULT): RasterSource
Reproject to different CRS with explicit sampling reprojectOptions.
Reproject to different CRS with explicit sampling reprojectOptions.
-
def
reprojectToGrid(targetCRS: CRS, grid: GridExtent[Long], method: ResampleMethod = ResampleMethod.DEFAULT, strategy: OverviewStrategy = OverviewStrategy.DEFAULT): RasterSource
Sampling grid and resolution is defined by given GridExtent.
Sampling grid and resolution is defined by given GridExtent. Resulting extent is the extent of the minimum enclosing pixel region of the data footprint in the target grid.
-
def
reprojectToRegion(targetCRS: CRS, region: RasterExtent, method: ResampleMethod = ResampleMethod.DEFAULT, strategy: OverviewStrategy = OverviewStrategy.DEFAULT): RasterSource
Sampling grid and resolution is defined by given RasterExtent region.
Sampling grid and resolution is defined by given RasterExtent region. The extent of the result is also taken from given RasterExtent, this region may be larger or smaller than the footprint of the data
-
def
resample(targetCols: Long, targetRows: Long, method: ResampleMethod = ResampleMethod.DEFAULT, strategy: OverviewStrategy = OverviewStrategy.DEFAULT): RasterSource
Sampling grid is defined of the footprint of the data with resolution implied by column and row count.
-
def
resampleToGrid(grid: GridExtent[Long], method: ResampleMethod = ResampleMethod.DEFAULT, strategy: OverviewStrategy = OverviewStrategy.DEFAULT): RasterSource
Sampling grid and resolution is defined by given GridExtent.
Sampling grid and resolution is defined by given GridExtent. Resulting extent is the extent of the minimum enclosing pixel region of the data footprint in the target grid.
-
def
resampleToRegion(region: GridExtent[Long], method: ResampleMethod = ResampleMethod.DEFAULT, strategy: OverviewStrategy = OverviewStrategy.DEFAULT): RasterSource
Sampling grid and resolution is defined by given RasterExtent region.
Sampling grid and resolution is defined by given RasterExtent region. The extent of the result is also taken from given RasterExtent, this region may be larger or smaller than the footprint of the data
-
def
rows: Long
Raster pixel row count
Raster pixel row count
- Definition Classes
- RasterMetadata
-
def
size: Long
- Definition Classes
- GridIntegral → Grid