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).r.toInt();
} else if (band == 1) {
return _raster!.data!.getPixel(col, row).g.toInt();
} else if (band == 2) {
return _raster!.data!.getPixel(col, row).b.toInt();
}
throw StateError("invalid band number");
}
}