code: public static GridCoverage2D buildCoverage( String name, RenderedImage renderedImage, HashMap<String, Double> envelopeParams,
              CoordinateReferenceSystem crs ) {
  
          double west = envelopeParams.get(WEST);
          double south = envelopeParams.get(SOUTH);
          double east = envelopeParams.get(EAST);
          double north = envelopeParams.get(NORTH);
          Envelope2D writeEnvelope = new Envelope2D(crs, west, south, east - west, north - south);
          GridCoverageFactory factory = CoverageFactoryFinder.getGridCoverageFactory(null);
  
          GridCoverage2D coverage2D = factory.create(name, renderedImage, writeEnvelope);
          return coverage2D;
      }
docs: Creates a {@link GridCoverage2D coverage} from the {@link RenderedImage image} and the necessary geographic Information.
  
  @param name the name of the coverage.
  @param renderedImage the image containing the data.
  @param envelopeParams the map of boundary parameters.
  @param crs the {@link CoordinateReferenceSystem}.
  @return the {@link GridCoverage2D coverage}.