code: public static WritableRandomIter getWritableRandomIterator( WritableRaster raster ) {
          if (raster instanceof GrassLegacyWritableRaster) {
              GrassLegacyWritableRaster wRaster = (GrassLegacyWritableRaster) raster;
              double[][] data = wRaster.getData();
              getWritableRandomIterator(data[0].length, data.length);
          }
          WritableRandomIter iter = RandomIterFactory.createWritable(raster, null);
          return iter;
      }
docs: Creates a {@link WritableRandomIter}.
  
  <p>It is important to use this method since it supports also
  large GRASS rasters.
  
  <p>If the size would throw an integer overflow, a {@link GrassLegacyRandomIter}
  will be proposed to try to save the saveable.
  
  @param raster the coverage on which to wrap a {@link WritableRandomIter}.
  @return the iterator.