Re: [GRASS-user] cog float32 export smaller scale missing tiles

2021-03-06 Thread Markus Metz
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  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


[GRASS-user] cog float32 export smaller scale missing tiles

2021-02-22 Thread Martin Landa
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