Implement convertGridNetwork() function.