R.out.gdal performance with known data type and range

Hi devs,

In a worflow I have to regularly export data to multi-band GeoTiff (COG actually) where I know the data range and the suitable GDAL data type across all bands to export in advance. Even though I use the -f flag and set the nodata option, a full data type and nodata check is performed on every band. To me that feels like unnecessary processing and seems inconsistent with the documentation of the -f flag.

Now, I would like to see r.out.gdal being able to skip the nodata and data type check all together. After a swift look at the code, I think I would be able to implement that. However, before starting at that I would like to know:

  1. are there any general objections
  2. How should that be implemented:
    a) as a new flag (e.g. -n for no nodata and data type check), keeping current behavior untouched or
    b) depending on other user input (e.g. if the f-flag and nodata option are given, the user should know what she or he is doing…) avoiding new not strictly necessary flags.

Any comments? OK if I give it a try?

Cheers,
Stefan