Hi Martin,

must be the metadata with the GRASS color rules that cause these problems
in QGIS. My guess is that QGIS does not apply these color rules in the
metadata to the overviews, only to the full COG bands.

Markus M


On Mon, Feb 22, 2021 at 3:37 PM Martin Landa <landa.mar...@gmail.com> wrote:

> Dear all,
>
> I am facing to a strange problem when exporting floating-point raster
> data into COG format using GDAL 3.2.1 and GRASS 7.8.5.
>
> Attempt to export raster data by `r.out.gdal format=COG` including
> color table fails from obvious reasons:
>
> ERROR 1: pm_filled_map.tif: Unable to export color table to GeoTIFF
> file.  Color tables can only be written to 1 band or 2 bands Byte or
> UInt16 GeoTIFF files.
>
> GDAL says:
>
> Band 1 Block=512x512 Type=Float32, ColorInterp=Palette
> Metadata:
>     COLOR_TABLE_RULES_COUNT=3
> ...
>
> QGIS loads data with invalid symbology (which can be easily "fixed" by
> "Classify" button in the "Symbology" tab).
>
> So far understandable. Data exported with `-c` and `-m` flags leads to
> a grayscale color interpretation.
>
> Band 1 Block=512x512 Type=Float32, ColorInterp=Gray
>
> BUT after loading a COG file into QGIS no data is displayed! But if I
> zoom in, the data is magically shown! Originally I thought that it's
> caused by a broken symbology. But it seems that COG file does not have
> tiles for smaller scales (identify tool reports no-data for whole AOI
> on smaller scales). If I create a regular GeoTIFF file the problem
> with zooming disappears.
>
> Another strange thing is that COG file created without `-c` and `-m`
> flags do not have problems with zoom levels.
>
> Any idea what could be wrong?
>
> Thanks in advance! Martin
>
> --
> Martin Landa
> http://geo.fsv.cvut.cz/gwiki/Landa
> http://gismentors.cz/mentors/landa
> _______________________________________________
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to