viewerRAT

Contains the ViewerRAT class

class tuiview.viewerRAT.RATCache(gdalRAT, chunkSize)[source]

Class that caches a ‘chunk’ of the RAT

autoScrollToIncludeRow(row)[source]

For calling from GUI. Qt will ask for a given row but we don’t want to re-read every time. Most requests will be around a location so we only update when we have to.

columnAdded(colName)[source]

Shortcut to be called when a new column added saves having to re-read all the data - just updates the cache with the new data

getLength()[source]

Return the length of the current RAT chunk

getValueFromCol(colName, row)[source]

Return the actual value given name of col and a row count based on the full rat

setStartRow(startRow, colName=None)[source]

Call this to set the cache to contain the new data If colName is None all columns will be updated otherwise just the named one

updateCache(colName=None)[source]

Internal method, called when self.currStartRow changed If colName is None all columns will be updated otherwise just the named one

updateColumn(colName, data, selectionArray)[source]

New data for a column. selectionArray is the size of the file’s RAT. data is just the subset for this cache. Updates only done where selectionArray == True (for the subset we are caching) updates cache and data in file

tuiview.viewerRAT.formatException(code)[source]

Formats an exception for display and returns string