kealib.extrat

Module that contains helpers for accessing kealib features not available from GDAL

def IsFakeGDAL(unknown):

IsFakeGDAL() -> bool

def getNeighbours(unknown):

getNeighbours(dataset: object, band: int, startfid: int, length: int) -> object

Return all the neighbours for the given dataset and band from startfid returing length features. Returned value is an awkward array

def setNeighbours(unknown):

setNeighbours(dataset: object, band: int, startfid: int, neighbours: object) -> None

Set the neighbours for the given dataset band from startfid. neighbours should be an awkward array

def addField(unknown):

addField(dataset: object, band: int, name: str, type: kealib::KEAFieldDataType, initval: object, usage: str) -> None

Add a column for the given dataset band. GDAL doesn't support creation of boolean columns, but presents boolean columns as integers and allows you to read and write them converting to/from integers. You will have to re-open the dataset with GDAL to see the new column.

def getNumFields(unknown):

getNumFields(dataset: object, band: int) -> int

Get the total number of fields

def getFieldByName(unknown):

getFieldByName(dataset: object, band: int, name: str) -> object

Return the named field

def getFieldByIdx(unknown):

getFieldByIdx(dataset: object, band: int, idx: int) -> object

Return the named index

def getSize(unknown):

getSize(dataset: object, band: int) -> int

Get the size of the RAT

def addRows(unknown):

addRows(dataset: object, band: int, nrows: int) -> None

Add rows to the RAT

def getField(unknown):

getField(dataset: object, band: int, field: kealib::KEAATTField, startfid: int, len: int) -> object

Read rows of a column

def setField(unknown):

setField(dataset: object, band: int, field: kealib::KEAATTField, startfid: int, data: object) -> None

Write rows of a column

def getSpatialInfo(unknown):

getSpatialInfo(dataset: object) -> object

Get the KEAImageSpatialInfo object for the image

def getImageBandDataType(unknown):

getImageBandDataType(dataset: object, band: int) -> kealib::KEADataType

Get the datatype of the band

def getNumOfImageBands(unknown):

getNumOfImageBands(dataset: object) -> int

def getNoDataValue(unknown):

getNoDataValue(dataset: object, band: int) -> float

def getImageBlock(unknown):

getImageBlock(dataset: object, band: int, col: int, row: int, xsize: int, ysize: int) -> object

Get a block of data from the band

class NeighbourAccumulator(pybind11_builtins.pybind11_object):
NeighbourAccumulator()

__init__(args, *kwargs) Overloaded function.

  1. __init__(self: NeighbourAccumulator, hist: numpy.ndarray, dataset: object, band: int) -> None

Construct a NeighbourAccumulator to find all the neighbours of pixels of arrays passed to addArray(). hist should be a histogram of the imagery data. The neighbours are written to the RAT of the given band of the dataset.

  1. __init__(self: NeighbourAccumulator, hist: numpy.ndarray, dataset: object, band: int, fourConnected: bool) -> None

Like the other constructor, but fourConnected controls whether there are 4 or 8 neighbours for a pixel.

def addArray(unknown):

addArray(self: NeighbourAccumulator, array: numpy.ndarray) -> None

Process a 2D array (from an image) adding all neighbours found. Very important: a one pixel overlap should be given between multiple tiles. Around the outside of the image, the ignore value should be used to fill in.

class KEAATTField(pybind11_builtins.pybind11_object):
KEAATTField()

__init__(self: KEAATTField) -> None

name

(self: KEAATTField) -> str

dataType

(self: KEAATTField) -> kealib::KEAFieldDataType

idx

(self: KEAATTField) -> int

usage

(self: KEAATTField) -> str

colNum

(self: KEAATTField) -> int

class KEAFieldDataType(pybind11_builtins.pybind11_object):

Members:

NA

Bool

Int

Float

String

KEAFieldDataType()

__init__(self: KEAFieldDataType, value: int) -> None

name

name(self: handle) -> str

value

(arg0: KEAFieldDataType) -> int

Bool = <KEAFieldDataType.Bool: 1>
Float = <KEAFieldDataType.Float: 3>
String = <KEAFieldDataType.String: 4>
Bool = <KEAFieldDataType.Bool: 1>
Float = <KEAFieldDataType.Float: 3>
String = <KEAFieldDataType.String: 4>
class KEADataType(pybind11_builtins.pybind11_object):

Members:

undefined

t8int

t16int

t32int

t64int

t8uint

t16uint

t32uint

t64uint

t32float

t64float

KEADataType()

__init__(self: KEADataType, value: int) -> None

name

name(self: handle) -> str

value

(arg0: KEADataType) -> int

undefined = <KEADataType.undefined: 0>
t8int = <KEADataType.t8int: 1>
t16int = <KEADataType.t16int: 2>
t32int = <KEADataType.t32int: 3>
t64int = <KEADataType.t64int: 4>
t8uint = <KEADataType.t8uint: 5>
t16uint = <KEADataType.t16uint: 6>
t32uint = <KEADataType.t32uint: 7>
t64uint = <KEADataType.t64uint: 8>
t32float = <KEADataType.t32float: 9>
t64float = <KEADataType.t64float: 10>
undefined = <KEADataType.undefined: 0>
t8int = <KEADataType.t8int: 1>
t16int = <KEADataType.t16int: 2>
t32int = <KEADataType.t32int: 3>
t64int = <KEADataType.t64int: 4>
t8uint = <KEADataType.t8uint: 5>
t16uint = <KEADataType.t16uint: 6>
t32uint = <KEADataType.t32uint: 7>
t64uint = <KEADataType.t64uint: 8>
t32float = <KEADataType.t32float: 9>
t64float = <KEADataType.t64float: 10>
class KEAImageSpatialInfo(pybind11_builtins.pybind11_object):
KEAImageSpatialInfo()

__init__(self: KEAImageSpatialInfo) -> None

wktString

(self: KEAImageSpatialInfo) -> str

tlX

(self: KEAImageSpatialInfo) -> float

tlY

(self: KEAImageSpatialInfo) -> float

xRes

(self: KEAImageSpatialInfo) -> float

yRes

(self: KEAImageSpatialInfo) -> float

xRot

(self: KEAImageSpatialInfo) -> float

yRot

(self: KEAImageSpatialInfo) -> float

xSize

(self: KEAImageSpatialInfo) -> int

ySize

(self: KEAImageSpatialInfo) -> int

class KeaLibException(builtins.Exception):

Common base class for all non-exit exceptions.

Inherited Members
builtins.Exception
Exception
builtins.BaseException
with_traceback
add_note
args