GeoTIFF reader won't use source subsampling if overviews are disabled

Description

If the GeoTIFF reader is asked to read a low resolution area of the source image, and overviews are disabled, it will also end up skipping subsampling, even if it was not disabled.

This happens here:
https://github.com/geotools/geotools/blob/eb2ca81be108c62cfd617d0a8afa3c6b89ef91a1/modules/library/coverage/src/main/java/org/geotools/coverage/grid/io/AbstractGridCoverage2DReader.java#L374

That return statements does not allow reaching, and calling, decimationOnReadingControl which would setup the subsampling control. It is also to be noticed that decimationOnReadingControl should be subject to the decimation policy hint:
https://github.com/geotools/geotools/blob/9fbd02a320fa19d563972808d226a0a0445a5b13/modules/library/metadata/src/main/java/org/geotools/factory/Hints.java#L751
However the above method does not even receive it.

Environment

None

Status

Assignee

Imran Rajjad

Reporter

Andrea Aime

Triage

Fix versions

Priority

Medium
Configure