loopWithDoubleValue method

  1. @override
void loopWithDoubleValue(
  1. Function colRowValueFunction
)
override

Loop over a raster using a function of type: (col, row, floatvalue) { ...processing goes in here }

Implementation

@override
void loopWithDoubleValue(Function colRowValueFunction) {
  if (_rows == null || _cols == null) {
    throw StateError("rows and cols are null");
  }
  for (var r = 0; r < _rows!; r++) {
    for (var c = 0; c < _cols!; c++) {
      colRowValueFunction(c, r, getDouble(c, r));
    }
  }
}