fmeobjects.FMEBand

Inheritance diagram of fmeobjects.FMEBand

FMEBand.appendPalette(palette)

Appends FMEPalette to the band.

FMEBand.enableBandCache(enableCache)

Enables/disables caching for this band.

FMEBand.equals(band)

Tells whether two bands are identical.

FMEBand.flushCache()

Removes any cached data and releases cache resources.

FMEBand.getBandCacheID()

Returns ID of the last band cache.

FMEBand.getMaxValue()

Returns maximum value of the band.

FMEBand.getMinValue()

Returns minimum value of the band.

FMEBand.getNodataValue()

Returns nodataValue of the band.

FMEBand.getNumPalettes()

Returns the number of palettes in a band.

FMEBand.getPalette(paletteIndex)

Returns a palette from the band based on its numbered order in the band.

FMEBand.getProperties()

Returns band properties of this band.

FMEBand.getRasterProperties()

Returns raster properties of the raster where this band is appended.

FMEBand.getTile(row, col, tile)

Populates a tile of data in the interpretation of the band starting at the values of row and col and encapsulating the number of columns defined in the tile.

FMEBand.hasBeenModified()

Returns whether the band has been modified from its baseline state.

FMEBand.hasDataBeenModifiedSinceCache()

Returns whether the band's data has been modified from its baseline state.

FMEBand.hasKnownMaxValue()

Tells whether the band knows its max value.

FMEBand.hasKnownMinValue()

Tells whether the band knows its min value.

FMEBand.isSelected()

Tells whether the band is selected for operations.

FMEBand.removePalette(paletteIndex)

Removes and returns a palette from the band.

FMEBand.setCacheWindow(startRow, numRows, ...)

Identifies the data that will be eligible for caching through getTile() call.

FMEBand.setDeleteSourceOnDestroy(deleteFlag)

Sets delete flag, identifying whether the band should delete its source data file when destroyed.

FMEBand.setMaxValue(tile)

Sets the max value of the band.

FMEBand.setMinValue(tile)

Sets the min value of the band.

FMEBand.setModified(modified)

Sets whether band has been modified from baseline state.

FMEBand.setOutputSize(rows, cols)

Changes the size of the source data.

FMEBand.setRasterProperties(rasterProperties)

Set the raster properties.

FMEBand.setSelected(selected)

Selects/ Deselects band for operations.

FMEBand.swapPopulator(populator)

Swaps the band's populator with the passed in populator.

class FMEBand

FME Band Class

Create an instance of a FMEBand object.

init(populator, rasterProperties, bandProperties, nodataValue)

Creates a Band instance using given arguments.

Parameters
Return type

FMEBand

Returns

An instance of a FMEBand object.

init(band)

Create a copy of the passed in band object.

Parameters

band (FMEBand) – The band object to create a copy of.

Return type

FMEBand

Returns

An instance of a FMEBand object.

__init__(*args, **kwargs)
appendPalette(palette)

Appends FMEPalette to the band.

Parameters

palette (FMEPalette) – Palette to append.

Return type

None

Raises

FMEException – An exception is raised if an error occurred.

enableBandCache(enableCache)

Enables/disables caching for this band.

Parameters

enableCache (bool) – True to enable, False to disable.

Return type

None

equals(band)

Tells whether two bands are identical.

Return type

bool

Returns

True, if two bands are the same.

flushCache()

Removes any cached data and releases cache resources.

Return type

None

getBandCacheID()

Returns ID of the last band cache.

Return type

int

Returns

ID of the last band cache.

getMaxValue()

Returns maximum value of the band.

Return type

Concrete type of FMETile

Returns

Maximum value of the band.

Raises

FMEException – An exception is raised if an error occurred.

getMinValue()

Returns minimum value of the band.

Return type

Concrete type of FMETile

Returns

Minimum value of the band.

Raises

FMEException – An exception is raised if an error occurred.

getNodataValue()

Returns nodataValue of the band.

This value represents unknown or invalid data. Often the value is at one of the extremes of the data type range.

If the band does not have a nodata value, None will be returned.

Return type

Concrete type of FMETile or None

Returns

NodataValue of the band.

Raises

FMEException – An exception is raised if an error occurred.

getNumPalettes()

Returns the number of palettes in a band.

Return type

int

Returns

Number of palettes in a band.

getPalette(paletteIndex)

Returns a palette from the band based on its numbered order in the band.

Parameters

paletteIndex (int) – Index number of the palette.

Return type

FMEPalette

Returns

A palette from the band.

Raises

FMEException – An exception is raised if an error occurred.

getProperties()

Returns band properties of this band.

Return type

FMEBandProperties

Returns

Band Properties of this band.

Raises

FMEException – An exception is raised if an error occurred.

getRasterProperties()

Returns raster properties of the raster where this band is appended.

Return type

FMERasterProperties

Returns

Raster Properties of the raster.

Raises

FMEException – An exception is raised if an error occurred.

getTile(row, col, tile)

Populates a tile of data in the interpretation of the band starting at the values of row and col and encapsulating the number of columns defined in the tile.

Parameters
  • row (int) – Row number.

  • col (int) – Column number.

  • tile (FMETile) – Tile to populate.

Return type

Concrete class of FMETile type

Returns

Tile after populating a tile of data.

Raises

FMEException – An exception is raised if an error occurred.

hasBeenModified()

Returns whether the band has been modified from its baseline state.

Return type

bool

Returns

True, if it has been modified. False, if it has not.

hasDataBeenModifiedSinceCache()

Returns whether the band’s data has been modified from its baseline state.

Return type

bool

Returns

True, if it has been modified. False, if it has not.

hasKnownMaxValue()

Tells whether the band knows its max value.

Return type

bool

Returns

True, if it knows the max value.

hasKnownMinValue()

Tells whether the band knows its min value.

Return type

bool

Returns

True, if it knows the min value.

isSelected()

Tells whether the band is selected for operations.

Return type

bool

Returns

True if this band is selected for operations.

removePalette(paletteIndex)

Removes and returns a palette from the band.

Parameters

paletteIndex (int) – Index number of the palette.

Return type

FMEPalette

Returns

Removed palette.

Raises

FMEException – An exception is raised if an error occurred.

setCacheWindow(startRow, numRows, startCol, numCols, tileNumRows, tileNumCols)

Identifies the data that will be eligible for caching through getTile() call.

Call should be made before requesting tiles to improve caching efficiency.

Parameters
  • startRow (int) – Starting row number.

  • numRows (int) – Number of rows that will be included in cache window.

  • startCol (int) – Starting column number.

  • numCols (int) – Number of columns that will be included in cache window.

  • tileNumRows (int) – Number of tiles per row.

  • tileNumCols (int) – Number of tiles per column.

Return type

None

Raises

FMEException – An exception is raised if an error occurred.

setDeleteSourceOnDestroy(deleteFlag)

Sets delete flag, identifying whether the band should delete its source data file when destroyed.

Parameters

deleteFlag (bool) – True to delete, False not to delete.

Return type

None

Raises

FMEException – An exception is raised if an error occurred.

setMaxValue(tile)

Sets the max value of the band.

Parameters

tile (FMETile) – Max value to be set.

Return type

None

Raises

FMEException – An exception is raised if an error occurred.

setMinValue(tile)

Sets the min value of the band.

Parameters

tile (FMETile) – Min value to be set.

Return type

None

Raises

FMEException – An exception is raised if an error occurred.

setModified(modified)

Sets whether band has been modified from baseline state.

Note that hasBeenModified is initially set to False.

Parameters

modified (bool) – True when properties is altered.

Return type

None

setOutputSize(rows, cols)

Changes the size of the source data.

Parameters
  • rows (int) – Number of rows.

  • cols (int) – Number of columns.

Return type

tuple[int]

Returns

New number of rows and columns after resampling the raster.

Raises

FMEException – An exception is raised if an error occurred.

setRasterProperties(rasterProperties)

Set the raster properties.

Parameters

rasterProperties (FMERasterProperties) – Raster properties object to assign.

Return type

None

Raises

FMEException – An exception is raised if an error occurred.

setSelected(selected)

Selects/ Deselects band for operations.

Parameters

selected (bool) – True to select, False to deselect.

Return type

None

swapPopulator(populator)

Swaps the band’s populator with the passed in populator.

The new populator must match the band properties (e.g. have the same number of rows/cols, and the same interpretation).

Parameters

populator (FMEBandTilePopulator) – FMEBandTilePopulator object.

Return type

None

Raises

FMEException – An exception is raised if an error occurred. The populator will be left unchanged if this is an unsupported operation.