code: protected void processGridNodes( GridCoverage2D inElev, Calculator<GridNode> calculator ) throws Exception {
          RegionMap regionMap = regionMap(inElev);
          int cols = regionMap.getCols();
          int rows = regionMap.getRows();
          double xRes = regionMap.getXres();
          double yRes = regionMap.getYres();
  
          RandomIter elevationIter = CoverageUtilities.getRandomIterator(inElev);
  
          ExecutionPlanner planner = createDefaultPlanner();
          planner.setNumberOfTasks(rows * cols);
  
          // Cycling into the valid region.
          for( int r = 0; r < rows; r++ ) {
              for( int c = 0; c < cols; c++ ) {
                  int _c = c, _r = r;
                  planner.submit(() -> {
                      if (!pm.isCanceled()) {
                          GridNode node = new GridNode(elevationIter, cols, rows, xRes, yRes, _c, _r);
                          calculator.calculate(node);
                      }
                  });
              }
          }
          planner.join();
      }
docs: Loops through all rows and cols of the given grid and calls the given
  calculator for each {@link GridNode}.