getInt method
Get the raster value as int at a given position and (optional) band.
Implementation
@override
int getInt(int col, int row, [int? band]) {
if (isEsriAsc) {
return dataList[row][col].toInt();
} else {
if (_raster == null) {
throw StateError("raster is null");
}
if (band == null || band == 0) {
return _raster!.data!
.getPixel(col, row)
.getChannel(Channel.red)
.toInt();
} else if (band == 1) {
return _raster!.data!
.getPixel(col, row)
.getChannel(Channel.green)
.toInt();
} else if (band == 2) {
return _raster!.data!
.getPixel(col, row)
.getChannel(Channel.blue)
.toInt();
}
throw StateError("invalid band number");
}
}